c# - asp:hyperlink not rendering correct HTML on server -



c# - asp:hyperlink not rendering correct HTML on server -

i'm working on project in asp.net webforms on .net 2.0 , running problem can't seem find cause for. have next code in aspx file:

<table> <tr> <td> <asp:hyperlink id="supportlink" runat="server">customer back upwards docket</asp:hyperlink> </td> </tr> <tr> <td> <asp:hyperlink id="entitlementslink" runat="server">edit entitlements</asp:hyperlink> </td> </tr> </table>

and when run locally in debug mode, works great. links appear , html rendered such:

local rendered html

<table> <tr> <td> <a id="ctl00_contentmain_supportlink" href="viewcustomer.aspx?customerid=659">customer back upwards docket</a> </td> </tr> <tr> <td> <a id="ctl00_contentmain_entitlementslink" href="editentitlements.aspx?customerid=659">edit entitlements</a> </td> </tr> </table>

however, when run on server in production, next html generated:

server rendered html

<table> <tr> <td> <a id="ctl00_contentmain_supportlink">customer back upwards docket</a> </td> </tr> <tr> <td> <a id="ctl00_contentmain_entitlementslink">edit entitlements</a> </td> </tr> </table>

as can see, href missing both. in code behind adding urls since having hard time getting them render in aspx file:

code behind file

protected void page_load(object sender, eventargs e) { supportlink.navigateurl = string.format("viewcustomer.aspx?customerid={0}", request.querystring["customerid"]); entitlementslink.navigateurl = string.format("editentitlements.aspx?customerid={0}", request.querystring["customerid"]); }

at point i'm not sure can do. plan re-write site in next few weeks in mvc4 seeing internal site , not generating money low on priorities list , won't much more attending awhile, means need prepare issue.

the server environment iis 6 on windows server 2003 , html renders way in both ie9 chrome 24.0.1312.57. have cleared cache in both browsers no avail , know page getting updated after publish because other features added same alter working in production.

edit

rezalas wondering got customerid from. query string. show blank query string wouldn't cause here local , production html no query string:

local rendered no query string

<table> <tr> <td> <a id="ctl00_contentmain_supportlink" href="viewcustomer.aspx?customerid=">customer back upwards docket</a> </td> </tr> <tr> <td> <a id="ctl00_contentmain_entitlementslink" href="editentitlements.aspx?customerid=">edit entitlements</a> </td> </tr> </table>

production html no query string

<table> <tr> <td> <a id="ctl00_contentmain_supportlink">customer back upwards docket</a> </td> </tr> <tr> <td> <a id="ctl00_contentmain_entitlementslink">edit entitlements</a> </td> </tr> </table>

for clarification, customerid value coming from? value when ran on server beingness pulled? because looks though id isn't beingness provided, , such string isn't beingness built , navigate url beingness excluded because doesn't have value.

c# webforms

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -