Page.SmartNavigation Page.SmartNavigation Page.SmartNavigation Page.SmartNavigation Property

定義

警告

此 API 現已淘汰。

取得或設定值,表示是否允許智慧型巡覽。Gets or sets a value indicating whether smart navigation is enabled. 這個屬性已被取代。This property is deprecated.

public:
 property bool SmartNavigation { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(false)]
[System.Obsolete("The recommended alternative is Page.SetFocus and Page.MaintainScrollPositionOnPostBack. http://go.microsoft.com/fwlink/?linkid=14202")]
public bool SmartNavigation { get; set; }
member this.SmartNavigation : bool with get, set
Public Property SmartNavigation As Boolean

屬性值

如果已啟用智慧型巡覽則為 true;否則為 falsetrue if smart navigation is enabled; otherwise, false.

備註

在大部分情況下,請勿在程式碼中設定這個屬性。In most circumstances, do not set this property in code. 設定SmartNavigation屬性設定為true@ Page .aspx 檔案中的指示詞。Set the SmartNavigation attribute to true in the @ Page directive in the .aspx file. 當要求網頁時,動態產生的類別會設定這個屬性。When the page is requested, the dynamically generated class sets this property.

注意

在 ASP.NET 2.0 版中,SmartNavigation屬性已被取代。In ASP.NET version 2.0, the SmartNavigation property is deprecated. 使用SetFocus方法和MaintainScrollPositionOnPostBack屬性改為。Use the SetFocus method and the MaintainScrollPositionOnPostBack property instead.

Microsoft Internet Explorer 5.5 瀏覽器中或更新版本中,智慧型巡覽所要求頁面時執行下列加強網頁的使用者體驗:When a page is requested by Microsoft Internet Explorer 5.5 browser, or later, smart navigation enhances the user's experience of the page by performing the following:

  • 排除導覽所造成的閃爍顯示。Eliminating the flash caused by navigation.

  • 移動 頁面時,保存捲軸位置。Persisting the scroll position when moving from page to page.

  • 保存的項目焦點之間巡覽。Persisting element focus between navigations.

  • 保留在瀏覽器的歷程記錄只有最後一個頁面狀態。Retaining only the last page state in the browser's history.

適合在使用需要經常回傳的 ASP.NET 網頁,但不會變更大幅在傳回的視覺內容,會使用智慧型巡覽。Smart navigation is best used with ASP.NET pages that require frequent postbacks but with visual content that does not change dramatically on return. 請仔細考慮這在決定要將此屬性設定為trueConsider this carefully when deciding whether to set this property to true.

適用於

另請參閱