My ideas

Friday, November 10, 2006

how to retain scroll position in asp.net

version : 2.0 and 3.0

A new trick in ASP.NET 2.0 to maintain position upon postback is as follows: <%@ Page Language="VB" MaintainScrollPositionOnPostBack="true" %> <%@ Page Language="C#" MaintainScrollPositionOnPostBack="true" %>

you can also use me.Page.MaintainScrollPositionOnPostBack = True as you boolean condition in the source code

version : 1.0

not tested by me, but everyone says it works

download

Click Here

copy this to your aspx page

"<%@ Register TagPrefix="jlc" Namespace="JLovell.WebControls" Assembly="StaticPostBackPosition" %>"

in you body put the below code
""

more info
http://aspalliance.com/356


keywords : retain scroll bar on postback ; hold scroll bar on postback ; retain hold scroll bar position on postback ; maintain scroll bar position ; asp .net vb .net c# .net v 2.0 v 1.0 v 3.0

4 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home