471,591 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,591 software developers and data experts.

Asp.Net AutoPostback and control focus

In Asp.Net v1.1 web form I have a number of controls which have the
autopostback enabled. Is it possible after the autopostback has run
that the control that caused the autopostback to get the focus?

Jun 21 '06 #1
1 1821
Hi, maybe you can use smartnavigation.
See http://geekswithblogs.net/ranganh/ar.../25/37616.aspx

Note that this solution only works on IE.
A cross-browser compatible solution is to use shomething like this:
Page.RegisterClientScriptBlock("focus",
"document.<id-of-your-control>.focus();")

--
Bent Kristiansen
bent.kristiansen(AT)bekk.no
"ro*******@hotmail.com" wrote:
In Asp.Net v1.1 web form I have a number of controls which have the
autopostback enabled. Is it possible after the autopostback has run
that the control that caused the autopostback to get the focus?

Jun 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Matt | last post: by
6 posts views Thread by Sunil | last post: by
3 posts views Thread by JJ | last post: by
3 posts views Thread by Brad | last post: by
4 posts views Thread by =?Utf-8?B?UmVuYXVkIExhbmdpcw==?= | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.