Monday, March 26, 2012

Set Focus

How do you set the focus on a web form in ASP.NET v1.1 using VB .NET 2003?
I have several textboxes on a web form and I want to set the focus to a
specific one after the user clicks submit.

Thanks,
-CarlCarl Tribble wrote:
> How do you set the focus on a web form in ASP.NET v1.1 using VB .NET 2003?
> I have several textboxes on a web form and I want to set the focus to a
> specific one after the user clicks submit.
> Thanks,
> -Carl

http://ryanfarley.com/blog/archive/2004/12/21/1325.aspx

hth

--
Craig
Microsoft MVP - ASP/ASP.NET
Here's how you set the focus to a control:
http://SteveOrr.net/faq/2in1.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Carl Tribble" <carl@.tribblesoftware.com> wrote in message
news:O7XydYjXGHA.196@.TK2MSFTNGP04.phx.gbl...
> How do you set the focus on a web form in ASP.NET v1.1 using VB .NET 2003?
> I have several textboxes on a web form and I want to set the focus to a
> specific one after the user clicks submit.
> Thanks,
> -Carl
Steve C. Orr [MVP, MCSD] wrote:
> Here's how you set the focus to a control:
> http://SteveOrr.net/faq/2in1.aspx

yikes! yes, steve's is the 'correct' example...my link was to one that
didn't use getElementById, which it should...sorry 'bout that...

--
Craig
Microsoft MVP - ASP/ASP.NET
Thanks to you both! I tried Steve's suggestion and it works beatifully!

"Craig Deelsnyder" <cdeelsny@.NO_SPAM_4_MEyahoo.com> wrote in message
news:O8AYsXlXGHA.2268@.TK2MSFTNGP02.phx.gbl...
> Steve C. Orr [MVP, MCSD] wrote:
>> Here's how you set the focus to a control:
>> http://SteveOrr.net/faq/2in1.aspx
>>
> yikes! yes, steve's is the 'correct' example...my link was to one that
> didn't use getElementById, which it should...sorry 'bout that...
> --
> Craig
> Microsoft MVP - ASP/ASP.NET

0 comments:

Post a Comment