serkan sendur 821 Postaholic Banned

I have an updatepanel control in the middle of a page, and i have a link at the top of the same page. I refresh the updatepanel by clicking the link ;however, i want the updatepanel to scroll intoview as well. My javascript scrollintoview method didnt work because updatepanel tries to keep the last position of the page after it is refreshed. So i searched google and found this script and added it to my page. It worked.

:
<script type="text/javascript">

var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_beginRequest(beginRequest);

function beginRequest()
{
prm._scrollPosition = null;
}

</script>