开发者

Changing validationsummary-text from resourcefile

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(Reso开发者_如何学编程urces), ErrorMessageResourceName="UsernameRequired")]
public object Username { get; set; }

How can I fix that?

/M


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)


How about expression builder syntax?

ResourceExpressionBuilder Class (System.Web.Compilation)

Basic Instincts: Resources and Localization in ASP.NET 2.0

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜