locked
Fragment identifiers RRS feed

  • Question

  • User65893105 posted

    In my web form I have some custom data validation that generates a list of error messsages in a box at the top of the page.  The error message list consists of a series of anchor tags displaying the error message and the control id that generated the error


    eg a textbox with missing data will generate an error like this


    http://website/webpage.aspx#controlid

    if the user clicks the error link, they are subsequently taken to this section of the page


    clicking this link causes the page to reload and code inside the Pageload event is executed.  There is some code in this event that i dont want to execute if its caused by clicking the error link.  How can I detect the presence of a fragment identitfier on the URL ?


    Ive tried this

    string url = Request.RawUrl;

    but it doesnt contain the #controlid, just webpage.aspx

    anyone help ?

    Friday, July 24, 2009 6:29 AM

Answers

All replies