To move to a certain part of a page using anchor tag...read the description please
I'm using the following code to move to this part of the page:
.
.
.开发者_JS百科<a title="news" name="news"></a>
.
.
But when I access or REDIRECTS from another page to this page using the URL like: http://localhost/mypage.aspx#news, the page goes to that part and again comes at the top of the page automatically changing the URL to http://localhost/mypage.aspx#.
There is no manually written javascript on page load in my code. The code does uses AJAX, UpdatePanel etc.
What could be the other possible reasons? Any help appreciated.
Are you absolutely sure there is no javascript? You've tagged the question asp.net
- maybe the framework adds some javascript to the rendered page?
If the MaintainScrollPositionOnPostback
directive is set on the page, it might cause the behavior described in the question. Is this property set on the page? Or maybe on a master page?
精彩评论