C
Chris Rathman
Setting MaintainScrollPositionOnPostBack=true gets me the behavior I
most often want, but there are times when I need to have the scroll
position return to the top of the page - instead of the last scroll
position. Is there a way to reset the scroll position in an event
handler? From looking at the generated html, I see two hidden fields
that are embedded in the form:
<input type="hidden" name="__SCROLLPOSITIONX" id="__SCROLLPOSITIONX"
value="0" />
<input type="hidden" name="__SCROLLPOSITIONY" id="__SCROLLPOSITIONY"
value="100" />
Is there a way to access and change these values in a PostBack event?
I can see it as:
Request.Form["__SCROLLPOSITIONY"]
But this is a Read-Only access.
Thanks,
Chris Rathman
most often want, but there are times when I need to have the scroll
position return to the top of the page - instead of the last scroll
position. Is there a way to reset the scroll position in an event
handler? From looking at the generated html, I see two hidden fields
that are embedded in the form:
<input type="hidden" name="__SCROLLPOSITIONX" id="__SCROLLPOSITIONX"
value="0" />
<input type="hidden" name="__SCROLLPOSITIONY" id="__SCROLLPOSITIONY"
value="100" />
Is there a way to access and change these values in a PostBack event?
I can see it as:
Request.Form["__SCROLLPOSITIONY"]
But this is a Read-Only access.
Thanks,
Chris Rathman