C# .NET - Bookmark on html

Asked By Ajay on 14-Jun-12 06:00 AM
Hi all,

how to make bookmark on a html page. on clicking on that link page should guide me to that particular contents of same page.

Regards
Ajay 
Vikram Singh Saini replied to Ajay on 14-Jun-12 06:23 AM
For your problem statement you can use internal links:

Declare anchor link as:

 
<a href="#sectionName">link to section</a>

<a name="sectionName"></a>

// There is no need to put something between anchor tags for second line. Now when user clicks the link to section it will be redirected to the name portion position.

dipa ahuja replied to Ajay on 14-Jun-12 07:19 AM
Try this way
<a href="#GroupA">Group A</a><br />
<a href="#GroupB">Group B</a><br />
 
<a name="GroupA">
  Hello this is a group A
  <%--Content of A--%>
</a>
  
 
<a name="GroupB">
  Hello this is a group B
  <%--Content of B--%>
</a>
 
DL M replied to Ajay on 14-Jun-12 07:27 AM
Hi..

Insert the following HTML code into the part of the web document you want to bookmark:
Code
-------
<a name="top"></a>

Now make a hyperlink that points to the bookmark

Code

<a href="#top">Top of Page</a>