tags:

views:

39

answers:

2

Hello

I was wondering if you guys know howto get the validationsummary "title" from resouce-file?

got this atm:

Html.ValidationSummary("Information missing.")

For my validation I use stuff like:

[Required(ErrorMessageResourceType=typeof(Resources), ErrorMessageResourceName="UsernameRequired")]
public object Username { get; set; }

How can I fix that?

/M

+1  A: 

I don't know if I understood well the nature of the problem, but you could do it like this if you have access to the resource file from web application project:

Html.ValidationSummary(Resources.YourInfomrationMissingKey)
Misha N.
A: 

How about expression builder syntax?

<%$ Resouces: ResourceName, ResourceKeyName %>

ResourceExpressionBuilder Class (System.Web.Compilation)

Basic Instincts: Resources and Localization in ASP.NET 2.0

takepara