Html anchor links are a way to navigate within a page. The anchor can be considered as a bookmark within a page, which when clicked takes the user to that section of a page. An anchor to a certain section of a page can be set in the following way.
The name attribute of the “a” element determines the anchor / bookmark to the page. The anchor can be accessed by setting the link like below.
Once the HiddenField value is set, the value can be accessed from the server side. In this example, when the button is clicked, the value is obtained and set as the Text property of the Literal control. Here is the code for Button click event.
The code finds the value of the HiddenField and displays it in the Literal control.