开发者

How to set two bindings in one expression

I have the following binding in my GridView:

Text='<%# Bind("FromDate", "{0:dd/MM/yyyy}") %>'

I would take 开发者_运维问答the format from the web config instead of hard coded value.

'<%$ AppSettings:EditDateFormat %>'

How can I do that?


How about this? this should work,

Text='<%# Bind("FromDate", "{0:" + System.Configuration.ConfigurationManager.AppSettings["EditDateFormat"]) +"}" %>'
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜