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
Post a Comment