c# - ASP Hyperlinks not working in release -


i have following code in asp.net webforms app. code in c# it's asp aspect seem t having problems with. links work fine in debug, in release don't seem available links.

            <asp:table id="table1" runat="server" backcolor="#36a3e4" width="950px">                 <asp:tablerow>                     <asp:tablecell verticalalign="middle" horizontalalign="center"><asp:hyperlink id="lnkshop" runat="server" forecolor="white" font-bold="true" navigateurl="shoplisting.aspx?cls=all">shop</asp:hyperlink></asp:tablecell>                     <asp:tablecell verticalalign="middle" horizontalalign="center"><asp:hyperlink id="hyperlink1" runat="server" forecolor="white" font-bold="true" navigateurl="~/faq.aspx">faq's</asp:hyperlink></asp:tablecell>                     <asp:tablecell verticalalign="middle" horizontalalign="center"><asp:hyperlink id="hyperlink2" runat="server" forecolor="white" font-bold="true" navigateurl="~/feedback.aspx">feedback</asp:hyperlink></asp:tablecell>                     <asp:tablecell verticalalign="middle" horizontalalign="center"><asp:hyperlink id="hyperlink3" runat="server" forecolor="white" font-bold="true" navigateurl="~/bookmark.aspx">bookmark us</asp:hyperlink></asp:tablecell>                     <asp:tablecell verticalalign="middle" horizontalalign="center"><asp:hyperlink id="hyperlink4" runat="server" forecolor="white" font-bold="true" navigateurl="~/about.aspx">about us</asp:hyperlink></asp:tablecell>                     <asp:tablecell verticalalign="middle" horizontalalign="center"><asp:hyperlink id="hyperlink5" runat="server" forecolor="white" font-bold="true" navigateurl="~/contact.aspx">contact us</asp:hyperlink></asp:tablecell>                     <asp:tablecell verticalalign="middle" horizontalalign="center"><asp:textbox id="txtsearch" runat="server" width="125px" text="search"></asp:textbox></asp:tablecell>                     <asp:tablecell verticalalign="middle" horizontalalign="center"><asp:button id="btnsearch" runat="server" text="go" /></asp:tablecell>                 </asp:tablerow>             </asp:table> 

i feel problem may iis , not code can't find that's different of other apps. pointers appreciated.

thanks.

i have stumbled upon once , solution problem replace "~" ".". example:

 <asp:hyperlink runat="server" navigateurl="./contact.aspx">test</asp:hyperlink> 

also, if it's not 100% required use asp controls sugest using tag page.resolveurl() , let asp handle page. 1 best solution in opinion. example:

<a href="<%= page.resolveurl("~/help.aspx") %>">help</a> 

ps: add answer because don't have enough rep...


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -