Anchor not working in asp.net

As the title suggests, I ran into a problem with ASP.NET bindings.

I installed them the same as in standard html

Example:

<a href="#Intro">Introduction</a>
and then further down the page, 
<a name="Intro" ...

      

for some reason, when I click the link, the #Intro is not appended to the url and I am not anchored.

However, if I manually add #Intro to the url it works.

Also, if I change #Intro to a name that doesn't have a matching anchor with the specified name attribute, it is added to the request

What's happening?

+1


source to share


5 answers


This looks more like a browser issue, otherwise you won't contain enough code.



The code you showed us looks good.

+2


source


This is not the case with you. This should be NAME = "INTRO" where you want to enter intro and href = "# INTRO" when you want to go back to the intro.



0


source


#INTRO

not #INTRO

.. works.

0


source


Please note that there should be no postback on the server. All of this is done on the client side, implemented by the browser. Try to recreate this in a different browser to disqualify the possibility that its some crazy browser issues. Scan the source code (browser, view source) on the page to see if anything happens when the user clicks on an input link (assuming you don't have events on the links, in which case look for the problem there).

0


source


Try stripping the quotes in the name tag and / or adding the page name to the anchor link.

-1


source







All Articles