Quantcast
Viewing latest article 2
Browse Latest Browse All 2

MVC validation Problems?

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 latest article 2
Browse Latest Browse All 2

Trending Articles