Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Building Controls (http://www.velocityreviews.com/forums/f59-asp-net-building-controls.html)
-   -   setting focus to textbox (http://www.velocityreviews.com/forums/t755996-setting-focus-to-textbox.html)

Tony Piperato 10-23-2003 06:45 PM

setting focus to textbox
 
Hello,

Can someone tell me if/how I can set the focus to a textbox so when the page
loads the cursor is placed in the textbox and the user can just begin
typing?

Thanks.

Pip



Victor Garcia Aprea [MVP] 10-23-2003 08:00 PM

Re: setting focus to textbox
 
Hi Tony,

Its pretty simple, you just need to output some javascript from the
server-side to set the focus to the control you want, take a look at
javascript's focus function. If I remember right, ScottGu[1] has posted a
ppt with some tricks & tips (including the focus one).

[1] http://weblogs.asp.net/scottgu

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

and not by private mail.
"Tony Piperato" <tonypiperato@hotmail.com> wrote in message
news:u%23QwMXZmDHA.1948@TK2MSFTNGP12.phx.gbl...
> Hello,
>
> Can someone tell me if/how I can set the focus to a textbox so when the

page
> loads the cursor is placed in the textbox and the user can just begin
> typing?
>
> Thanks.
>
> Pip
>
>





All times are GMT. The time now is 04:53 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.