asp.net - Why does using <%=ConfigurationManager.AppSettings("MySetting")%> cause href attribute not to render in asp:HyperLink? -


i trying bind hyperlink control's navigateurl property in markup using server tag so:

<asp:hyperlink id="lnkhelp" runat="server" navigateurl='<%#configurationmanager.appsettings("helpurl")%>'>text</asp:hyperlink>

the ide recognizes , intellisense, tag ends rendering without href attribute. i've discovered <%$ appsettings:helpurl%> , have started using this, don't intellisense it. that's not deal breaker, intellisense nice. that's question time, though, wanting know why using <%# %> causes href attribute not render.

you should use this

navigateurl='<%$ configurationsettings.appsettings["helpurl"] %>' 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -