• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 738
  • Last Modified:

ASP.net VB.net - Using Javascript behind button click to scroll to a point on the page

Hi. I was given the following code to scroll to a point on my web page in my ASP.net VB.net project on a button click. I put the function below in the button click event but it does ot recognize the code. What am I doing wrong?

JavaScript function

function anchor(MyID){

Select allOpen in new window

<asp:HyperLink ID="HyperLink1" runat="server" onclick="anchor('label1');"></asp:HyperLink>

Select allOpen in new window


<a name="label1" ID="label1"></a> your content
Murray Brown
Murray Brown
1 Solution
Change this

<asp:HyperLink ID="HyperLink1" runat="server" onclick="anchor('label1');"></asp:HyperLink>


<asp:HyperLink ID="HyperLink1" runat="server" onclientclick="anchor('label1');"></asp:HyperLink>
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now