Did you just note that in ASP.NET 2.0 Control has
Focus() method which sets the focus. So you wouldn't need to create the script yourself but just call
controlToFocus.Focus() (perhaps the need to make central function to set focus in that case is actually obsolete)
joteke
All-Star
46284 Points
6896 Posts
ASPInsiders
MVP
Re: How to use ClientScript.RegisterStartupScript in App_code files? is it possible??
May 03, 2006 02:51 PM|LINK
controlToFocus.Page.ClientScript....
Did you just note that in ASP.NET 2.0 Control has Focus() method which sets the focus. So you wouldn't need to create the script yourself but just call controlToFocus.Focus() (perhaps the need to make central function to set focus in that case is actually obsolete)
Teemu Keiski
Finland, EU