Monday, August 17, 2009

Creating a Dynamic Hyperlink in ASP.NET using the Web.Config

A user recently asked me that she wanted to create a bunch of hyperlinks whose value comes from a web.config. However she was not able to create the Hyperlink successfully by reading the key pair values. Here's how to do so:










Now read this entry from the web.config using AppSettings



NavigateUrl="<%$ Appsettings:someurl %>" Text="Click Here">

No comments:

Post a Comment