Setting control focus on roundtrip

Discussion in 'ASP .Net Web Controls' started by Inge Larsson, Apr 27, 2006.

  1. Inge Larsson

    Inge Larsson Guest

    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
     
    Inge Larsson, Apr 27, 2006
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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
     
    Steve C. Orr [MVP, MCSD], Apr 28, 2006
    #2
    1. Advertising

  3. Inge Larsson

    Inge Larsson Guest

    Thanks Steve for this solution, which taken generically is very valuable in a
    lot more situations!

    Inge

    "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" <> wrote in message
    > news:...
    > > 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

    >
    >
    >
     
    Inge Larsson, May 10, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Row
    Replies:
    0
    Views:
    443
    Peter Row
    Jan 28, 2004
  2. mawi
    Replies:
    2
    Views:
    362
  3. Jason
    Replies:
    4
    Views:
    1,666
    Jason
    May 7, 2007
  4. J.Hero

    server control: recreating controls after roundtrip

    J.Hero, Nov 20, 2003, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    157
    J.Hero
    Nov 20, 2003
  5. Roger
    Replies:
    3
    Views:
    361
Loading...

Share This Page