Lets Have a fun with Technology.


Follow by Email

Friday, September 5, 2008

Book Mark In ASP.Net

Book Mark In ASP.Net

After Performing Some action in Asp.net application There are Required to jump on Specific
Control or Specific Part of Page.It's Can Be archive by Following method.

Write Down Following code in ASP.net .Aspx Source Code.

< a name="jumphere1" > < /a >

Write down following Code in .Cs File

     private void registerAnchorScript(String strAnchorID)
        String Script = "";

        Script += " < script language=JavaScript id='BookMarkScript' > ";
        Script += "var hashValue='#" + strAnchorID + "';";
        Script += "if(location.hash!=hashValue)";
        Script += "location.hash=hashValue;";
        Script += " < /script > ";
        if (Page.IsStartupScriptRegistered("BookMarkScript"))
            Page.RegisterStartupScript("BookMarkScript", Script);

Write Down Following Code in Some Event's Like Page Load,Click or else from where you
want to jump on specific Part of page.


Prev Post                                                      All Post                                                           Next Post


Post a Comment