Click to See Complete Forum and Search --> : Cursor placement on autopostback


Bill Crawley
August 10th, 2005, 05:30 AM
Hi All,

I have a large input form that the user needs to scroll to complete (this is the way the users want it).

I have several controls that have autopostback set to true. The code all works fine, however when this happens how can I place the cursor back where it was and not at the beginning of the page?

Thanks

Igor Soukhov
August 12th, 2005, 08:38 AM
What does "how can I place the cursor back" mean ?
If you want to restore scroll position of the page - use
ASP .NET feature called "Smart Navigation". However this
feature has some limitations (it works with the only with IE only)
and you may try to implement similiar functionality using client-side scripts.

Here's the simple example how to implement it -

http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309bm_l/asp200309bm_l.asp art

Bill Crawley
August 12th, 2005, 09:25 AM
Thanks,

Works a treat. I can use SmartNavigation because I know the target audience will all be using I.E.