Page.MaintainScrollPositionOnPostBack Page.MaintainScrollPositionOnPostBack Page.MaintainScrollPositionOnPostBack Page.MaintainScrollPositionOnPostBack Property

定義

取得或設定值,指出在回傳後是否將使用者返回用戶端瀏覽器中的相同位置。Gets or sets a value indicating whether to return the user to the same position in the client browser after postback. 這個屬性會取代已過時的 SmartNavigation 屬性。This property replaces the obsolete SmartNavigation property.

public:
 property bool MaintainScrollPositionOnPostBack { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(false)]
public bool MaintainScrollPositionOnPostBack { get; set; }
member this.MaintainScrollPositionOnPostBack : bool with get, set
Public Property MaintainScrollPositionOnPostBack As Boolean

屬性值

如果應該維護用戶端位置,則為 true,否則為 falsetrue if the client position should be maintained; otherwise, false.

備註

當網頁回傳至伺服器時,使用者會回到頁面頂端。When Web pages are posted back to the server, the user is returned to the top of the page. 在很長的 Web 網頁上,這表示使用者必須捲動頁面回傳至頁面上的最後一個位置。On long Web pages, this means that the user has to scroll the page back to the last position on the page.

MaintainScrollPositionOnPostBack屬性設定為true,使用者會改為傳回的最後一個位置在頁面上。When the MaintainScrollPositionOnPostBack property is set to true, the user is instead returned to the last position on the page.

您設定MaintainScrollPositionOnPostBack中的屬性@ Page指示詞。You set the MaintainScrollPositionOnPostBack property in the @ Page directive.

適用於