Link to home
Start Free TrialLog in
Avatar of young_nacs
young_nacs

asked on

how to jump to next anchor location without reload page in asp.net

Hi
 I have an asp.net page, aspx and aspx.cs to display bunch of images.
I like to jump to next or previous image by adding anchor like scroll up/down.
I am using javascrip to jump to any anchor which is working fine by:
function goNextAnchor(where)
{
    window.location.hash = where;
    // or window.location.href = "#" + where;
}

But problem is page reloading. how can I just jumpt to next anchor without reloading the page again because page is not static build by cs code. Due to reload, page is jumped to the top instead desire anchor location.

Can someone help me?
Thanks,

Avatar of Tomeeboy
Tomeeboy
Flag of United States of America image

Just use the standard page anchors with no javascript...

<a name="anchor1">

<a href="#anchor1">
ASKER CERTIFIED SOLUTION
Avatar of Tomeeboy
Tomeeboy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial