Home All Groups Group Topic Archive Search About

Setting control focus on roundtrip

Author
27 Apr 2006 8:30 PM
Inge Larsson
Hi,

I have a number of TextBox'es and do AutoPostBack of the form for every text
box that the user leave (to handle data along the way). However, the tab
order is broken for every postback, and the tab order starts from the
beginning on every load of the page. Is there a way in ASP.NET 1.1 to, from
the CodeBehind page, set focus to whatever TextBox I like?

Thanks,
Inge

Author
28 Apr 2006 4:13 AM
Steve C. Orr [MVP, MCSD]
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


Show quoteHide quote
"Inge Larsson" <IngeLars***@discussions.microsoft.com> wrote in message
news:31EF99BD-FBF7-41B0-9BF9-46D15A8DE431@microsoft.com...
> Hi,
>
> I have a number of TextBox'es and do AutoPostBack of the form for every
> text
> box that the user leave (to handle data along the way). However, the tab
> order is broken for every postback, and the tab order starts from the
> beginning on every load of the page. Is there a way in ASP.NET 1.1 to,
> from
> the CodeBehind page, set focus to whatever TextBox I like?
>
> Thanks,
> Inge
Are all your drivers up to date? click for free checkup

Author
10 May 2006 2:53 PM
Inge Larsson
Thanks Steve for this solution, which taken generically is very valuable in a
lot more situations!

Inge

Show quoteHide quote
"Steve C. Orr [MVP, MCSD]" wrote:

> 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
>
>
> "Inge Larsson" <IngeLars***@discussions.microsoft.com> wrote in message
> news:31EF99BD-FBF7-41B0-9BF9-46D15A8DE431@microsoft.com...
> > Hi,
> >
> > I have a number of TextBox'es and do AutoPostBack of the form for every
> > text
> > box that the user leave (to handle data along the way). However, the tab
> > order is broken for every postback, and the tab order starts from the
> > beginning on every load of the page. Is there a way in ASP.NET 1.1 to,
> > from
> > the CodeBehind page, set focus to whatever TextBox I like?
> >
> > Thanks,
> > Inge
>
>
>

Bookmark and Share

Post Thread options