Quantcast
Channel: MVC validation Problems?
Viewing all articles
Browse latest Browse all 2

MVC validation Problems?

$
0
0

Merhabalar

MVC de validation yapısında 

[DisplayName("Adınız")]
[Required(ErrorMessage = "{0}alanı boş geçilemez. Lütfen Doldurunuz...!")]

yerine veri tabanından gelen Resources yapısına uygun veriyi kullanmak istiyorum ama hata alıyorum.

-------------------------------------------------------------------------------------------------------------------------------------------

Kullandığım yapı:

[Display(Name = Resources.Resources.GetResource("Adiniz"), ResourceType = typeof(Resources.Resources))]
        [Required(ErrorMessageResourceType = typeof(Resources.Resources),
                  ErrorMessageResourceName = Resources.Resources.GetResource("AdUyariMesaj"))]

--------------------------------------------------------------------------------------------------------------------------------------------

Hata Mesajı:

Severity    Code    Description    Project    File    Line    Suppression State
Error    CS0182    An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type    Proje    F:\Proje\Proje\App_Classes\Mail\Contacts.cs   14    Active


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>