Tuesday, July 17, 2007

Page.SetFocus(Control)

To maintain cursor position during postbacks (when the page has more content & there are scroll bars) we can use Page.SetFocus(controlname) in .NET 2.0

There is also another option to achive this :

set

SmartNavigation = true

for the page attribute in .aspx page (in HTML view).


SmartNavigation sometimes creates problems in production. It doesnt allow pages to be redirected to another page.

No comments: