How to access application setting through markup using expression?

Posted by ParagM on Stack Overflow See other posts from Stack Overflow or by ParagM
Published on 2010-03-19T09:10:17Z Indexed on 2010/03/19 9:21 UTC
Read the original article Hit count: 194

Filed under:

In a repeater control I've Eval binding as:

<%#Eval("PubDate", "{0:dd-MMM-yyyy}")%>

But date time format needs to be configurable from the web.config. I want to access datetime format from web.config in markup like:

<%#Eval("PubDate", "{0:<%$ AppSettings: DateTimeFormat %>}")%>

But is is not working... Any suggesions?

© Stack Overflow or respective owner

Related posts about ASP.NET