473,503 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Focus some controls

Hello.

How can I set focus to some controls?
For example I want to set focus to some textbox when the page is loaded or
when I click on some button.
And I have one more question: how can set some button as default button for
the form?

Thank you.
Nov 18 '05 #1
3 1260
Jos
Dave wrote:
Hello.

How can I set focus to some controls?
For example I want to set focus to some textbox when the page is
loaded or when I click on some button.
Google is your friend:
http://www.google.com/search?q=%22asp.net%22+focus
And I have one more question: how can set some button as default
button for the form?


Google is your friend again:
http://www.google.com/search?hl=nl&c...ult+button&lr=

--

Jos
Nov 18 '05 #2
Maybe they neeed some Ritalin or Adderol. I know I do!

--
;-),
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Dave" <da*********@hotmail.com> wrote in message
news:uS**************@TK2MSFTNGP11.phx.gbl...
Hello.

How can I set focus to some controls?
For example I want to set focus to some textbox when the page is loaded or
when I click on some button.
And I have one more question: how can set some button as default button for the form?

Thank you.

Nov 18 '05 #3
Sorry about the bad joke. Here's the answer:
How can I set focus to some controls?
javascript: document.getElementById("elementID").focus();
And I have one more question: how can set some button as default button for the form?
Make it the Submit button.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Dave" <da*********@hotmail.com> wrote in message
news:uS**************@TK2MSFTNGP11.phx.gbl... Hello.

How can I set focus to some controls?
For example I want to set focus to some textbox when the page is loaded or
when I click on some button.
And I have one more question: how can set some button as default button for the form?

Thank you.

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1884
by: Jason | last post by:
I have created a c-sharp app that has keyup, keydown events tied to the form. The form also has some other controls, buttons, labels and 1 custom control that I made which inherits from user...
0
5028
by: Miquel | last post by:
Hi all. I felt frustrated when developing an 'UserControl' derivated from textBox, because sequence event (and Validate event) seems to fail. I Always thought my code was wrong. But after...
2
19561
by: chris | last post by:
Does anybody know how I can programmatically cause a textbox to lose focus and automatically jump to the next appropriate control. I have a custom textbox usercontrol whereby the requirement is...
4
3128
by: PK9 | last post by:
I have a button at the top of my page that I have an onClick event handler for which makes some new controls (at the bottom of my page) visible. When the user clicks the button I make the new...
8
1988
by: copyco | last post by:
I want to be able to test if my app's form has focus, (ie: not in background, behind other windows). How can I do this? I tried the Me.Focused, but that doesn't work. I think it's because a...
1
2030
by: clickon | last post by:
For testing purposes i have got a 2 step WizardControl. Eqach step contains a text box, TextBox1 and TextBox2 respectively. If i put the following code in the respective activate event handlers...
7
30319
by: Pygmalion | last post by:
Hello experts, I want to use Form_Keydown event in my program. However, it turns out that one of the form controls is always in focus, so Form_Keydown event is never invoked. I tried to set...
6
2596
by: =?Utf-8?B?U2NvdHQgTGFt?= | last post by:
Hi, I have a VB.NET form with a bunch of controls in it . The focus is in one of the controls , (i.e. a textbox), is there any way to click on the form itself and make the textbox lose focus and...
4
1951
by: Rafael A. M. Borges | last post by:
Hi, How can I set the focus on the first control in the page? I tried Page.Controls(0).Focus() but it didn't works. Does anyone knows it?
5
11617
by: Matt B | last post by:
I know this is a bit of nonstandard behavior, but I would like the Enter key to move focus through a group of radiobuttons without selecting them. The user would then have to use Space or actually...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.