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. 在長的網頁上, 這表示使用者必須將頁面向後移動至頁面上的最後一個位置。On long Web pages, this means that the user has to scroll the page back to the last position on the page.

當屬性設定為true時, 使用者會改為回到頁面上的最後一個位置。 MaintainScrollPositionOnPostBackWhen 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.

適用於