还记得 Page.SmartNavigation 属性么,此属性已被否决。

还记得在.Net 1.x 中我们为了保持在页面回发后 保持滚动条位置的做法么?
Page.SmartNavigation 可以做到,但会带来这样那样的问题。
我们也曾经用这样那样的方法实现这个效果,如:

http://huobazi.cnblogs.com/archive/2004/09/20/ScrollPage.aspx
http://www.cnblogs.com/birdshome/archive/2004/12/13/76521.html

在.Net 2.0 中,该类型被描述为:
 
[ObsoleteAttribute("The recommended alternative is Page.SetFocus and Page.MaintainScrollPositionOnPostBack. http://go.microsoft.com/fwlink/?linkid=14202")]
public bool SmartNavigation { get; set; }

注意:此属性现在已过时。

获取或设置指示是否启用智能导航的值。

同时在备注内有提到:

SmartNavigation 属性已被否决。请改用 SetFocus 方法和 MaintainScrollPositionOnPostback 属性。

园子里birdshome 也早有post了 SmartNavigation在Fx2.0中下岗了

posted on 2006-06-29 16:55  活靶子.Net  阅读(3031)  评论(2编辑  收藏  举报

导航