开发者

How to set two bindings in one expression

开发者 https://www.devze.com 2023-02-20 14:21 出处:网络
I have the following binding in my GridView: Text=\'<%# Bind(\"FromDate\", \"{0:dd/MM/yyyy}\") %>\'

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

精彩评论

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