obautista
obautista

Reputation: 3773

ASP.NET Concatenate AppSetting Value with DataBinder Value In Markup Page

Is it possible to concatenate AppSetting value in WebConfig with DataBinder value in markup page (i.e. .aspx page - not codebehind)

This does not work:

' NavigateUrl='<%$ AppSettings:NewsPressReleasesDefaultPage %> + <%# DataBinder.Eval(Container.DataItem, "ReleaseDate") %>'>

Upvotes: 1

Views: 2796

Answers (1)

Loki Kriasus
Loki Kriasus

Reputation: 1301

Use ConfigurationManager.AppSettings:

NavigateUrl='<%# System.Configuration.ConfigurationManager.AppSettings["NewsPressReleasesDefaultPage"] + Eval("ReleaseDate").ToString() %>'>

Upvotes: 2

Related Questions