开发者

How to localize HeaderText in GridView or validation controls?

I cannot figure out why HeaderText or validation controls always fallback to default culture - even though rest of the controls are in correct culture.

I have a GridView with HeaderText specified in this way>

<asp:BoundField DataField="totalSales" HeaderText="<%$ Resources:Strings,TotalSales %>" />

In the same way I have va开发者_如何学Pythonlidation controls and they can't be localized.

Only this syntax does work: <%= Resources.Strings.Payments %>

I set different culture in Master page using this statement in Page_Init

Me.Page.Culture = "pl-PL"
Me.Page.UICulture = "pl-PL"

Can anyone spot what's wrong? I have been Googling it for last few days without success.

Thanks!


Have you tried to use ExpressionBuilder? That works very well and allows you to localize everything using the same approach.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜