469,578 Members | 1,843 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

Setting focus to controls?

Hi!

Please advise how to set focus to any control on Web
and Windows Forms.

Regards

Imran
Jul 21 '05 #1
2 1361
APG
Hi Imran,

Windows Forms:

The Focus() method of the Control class sets focus to the control.
Like: textbox1.Focus(); will set the foucs to the text box in the form.
The control should be selectabe for setting the foucs to it. Hence some
controls like the Panel and group box cannot have the foucs set.

Web:
Here is a nice KB Article on HowTo Set Focus to Web Form Controls By
Using Client-Side Script :
http://support.microsoft.com/default...B;EN-US;816166

HTH,
APG

IMRAN SAROIA wrote:
Hi!

Please advise how to set focus to any control on Web
and Windows Forms.

Regards

Imran

Jul 21 '05 #2
Thanks
"IMRAN SAROIA" <im*************@hotmail.com> wrote in message
news:et**************@TK2MSFTNGP12.phx.gbl...
Hi!

Please advise how to set focus to any control on Web
and Windows Forms.

Regards

Imran

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Melissa | last post: by
1 post views Thread by Jason | last post: by
1 post views Thread by Rachel Suddeth | last post: by
12 posts views Thread by CLEAR-RCIC | last post: by
2 posts views Thread by IMRAN SAROIA | last post: by
7 posts views Thread by Pygmalion | last post: by
8 posts views Thread by Brad Isaacs | last post: by
3 posts views Thread by kelvin.koogan | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.