Formatting appSettings data using Expression Builder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know if it's possible to format data stored in an appSetting node
when it's bound to a form control? I would like to format a date stored in
appSettings, and I bind to it as follows:

<asp:Label ID="SomeLabelID" Runat="Server" Text="<%$AppSettings:someDate %>"
/>
 
Hey,

Are you trying to achieve something like this?

<input type=text
value="<%=System.Configuration.ConfigurationSettings.AppSettings["fDate"].ToString()%>">
fDate is the key given in web.config.

Hope this would help u.

-Baskar BV-
 
That will definitely work, but I was hoping that I could use declarative
syntax like $AppSettings:fDate since it is much easier for our designers to
use that syntax instead of the full declaration.

BASKAR BV said:
Hey,

Are you trying to achieve something like this?

<input type=text
value="<%=System.Configuration.ConfigurationSettings.AppSettings["fDate"].ToString()%>">
fDate is the key given in web.config.

Hope this would help u.

-Baskar BV-

Darren Carter said:
Does anyone know if it's possible to format data stored in an appSetting node
when it's bound to a form control? I would like to format a date stored in
appSettings, and I bind to it as follows:

<asp:Label ID="SomeLabelID" Runat="Server" Text="<%$AppSettings:someDate %>"
/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top