cursor on first control

R

Rolf Brockmann

I want to set the focus to an special Textbox when the website is selected.
how can I do this.
I am useing C# - ASP.NET
 
G

Giles

I want to set the focus to an special Textbox when the website is selected.
how can I do this.

This is clientside, not asp. However
Do not try the often used <body onload="document.myform.txt1.focus()">
If the (slow connection) user has started filling forms before a full page
load, the focus will suddenly go back to the start when loading is finished,
in the middle of typing.
Immediately after the <input> in question, you can place a client-side
script block setting the focus.
Be aware that some browsers and doctypes do not handle randomly placed
script blocks very well. You might use asp to offer this little luxury only
to platforms that you know are OK with it.
Giles
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top