Page.SmartNavigation 属性

定义

注意

The recommended alternative is Page.SetFocus and Page.MaintainScrollPositionOnPostBack. http://go.microsoft.com/fwlink/?linkid=14202

获取或设置指示是否启用了智能导航的值。 此属性已弃用。

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

属性值

如果已启用智能导航,则为 true;否则为 false

属性

注解

在大多数情况下,请勿在代码中设置此属性。 在 SmartNavigation .aspx 文件中的 @ Page 指令中,将 属性true设置为 。 请求页面时,动态生成的类将设置此属性。

注意

在 ASP.NET 版本 2.0 中 SmartNavigation , 属性已弃用。 SetFocus请改用 方法和 MaintainScrollPositionOnPostBack 属性。

当Microsoft Internet Explorer 5.5 或更高版本浏览器请求页面时,智能导航通过执行以下操作来增强用户的页面体验:

  • 消除导航导致的闪烁。

  • 在从一页移动到一页时保留滚动位置。

  • 在导航之间保留元素焦点。

  • 仅保留浏览器历史记录中的最后一页状态。

智能导航最适合用于 ASP.NET 页面,这些页面需要频繁回发,但视觉内容不会在返回时发生显著变化。 在决定是否将此属性设置为 时,请仔细考虑这一 true点。

适用于

另请参阅