Using of ApplicationSettings in markup code

Posted by Dirk on Stack Overflow See other posts from Stack Overflow or by Dirk
Published on 2010-04-23T12:28:23Z Indexed on 2010/04/23 12:33 UTC
Read the original article Hit count: 281

Filed under:
|
|
|

I want to use ApplicationSettings in the markup code of an ASP.NET Web Application. Inspired by code behind this was my first try:

<%= My.Settings.MyApplicationSetting %>

No success.

I ended up with this lengthy statement

<%= Global.MyRootNameSpace.My.MySettings.Default.MyApplicationSetting %>

I can’t believe that this is the best solution. Isn’t it?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about markup