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"]) +"}" %>'
精彩评论