Search Results

Search found 1 results on 1 pages for 'jamietre'.

Page 1/1 | 1 

  • NavigateUrl="#" becomes href="SubFolder/#"??

    - by jamietre
    This isn't exactly Fermat's last theorem, but it keeps coming back to annoy me like an unpaid phone bill from college. Sometimes I want to create a HyperLink that does not cause a postback, so I want the target url to be #. When the markup happens to be from a UserControl in a subfolder, / |- Home.aspx (uses UC.ascx) |- Sub |- UC.ascx the URL is rewritten with a relative path, e.g. <asp:HyperLink runat="server" NavigateUrl="#" >Click Me!</asp:HyperLink> becomes <a href="SubFolder/#">Click Me!</a> Which is, unfortunately, wrong. Obviously I can get around this by not using a server control, but it seems stupid. Can this be avoided? The point here is I will add a click event with jQuery or in code-behind, and I never want it to cause a postback, but I want it to be a hyperlink for CSS reasons.

    Read the article

1