views:

147

answers:

2

Does anybody know how to make the vertical scrollbar the browser window return to the top in code? Either javascript or code-behind would be fine.

+1  A: 

This will do it in JavaScript.

<a href="#" onclick="javascript:scroll(0,0);">Top</a>
CptSkippy
Why the downvote? Is this not a good method?
Mike C.
This method works fine in IE 6/7/8, Safari 3.0, Chrome and FireFox 3.0
CptSkippy
A: 

I ran across this article that may help you. Resetting Scroll Position When Using MaintainScrollPositionOnPostback

tessa