Gets or sets a value indicating whether to return the user to the same position in the client browser after postback. This property replaces the obsolete SmartNavigation property.
<BrowsableAttribute(False)> _ Public Property MaintainScrollPositionOnPostBack As Boolean
Dim instance As Page Dim value As Boolean value = instance.MaintainScrollPositionOnPostBack instance.MaintainScrollPositionOnPostBack = value
[BrowsableAttribute(false)] public bool MaintainScrollPositionOnPostBack { get; set; }
[BrowsableAttribute(false)] public: property bool MaintainScrollPositionOnPostBack { bool get (); void set (bool value); }
public function get MaintainScrollPositionOnPostBack () : boolean public function set MaintainScrollPositionOnPostBack (value : boolean)
<asp:Page MaintainScrollPositionOnPostBack="True|False" />
When Web pages are posted back to the server, the user is returned to the top of the page. On long Web pages, this means that the user has to scroll the page back to the last position on the page.
When the MaintainScrollPositionOnPostback()()() property is set to true, the user is instead returned to the last position on the page.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
This property does not apply to controls (example ListBox) added to a User control. If the attribute is set in the page directive to where the User Control resides or in the Web.Config file it does not maintain the state of position after a full or partial postback.
Dim instance As PageDim value AsBooleanvalue = instance.MaintainScrollPositionOnPostBackinstance.MaintainScrollPositionOnPostBack = value----------------------------------------------------------------
Dim instance As New Page instead of Dim instance As Page
Does not work in other browsers.Better to implement the functionality thru Javascript