Set Focus to control after postback

Discussion in 'ASP .Net' started by =?Utf-8?B?VmljdG9yaW91czE=?=, Oct 29, 2007.

  1. I am usingVB with .net 1.1 and I wish to set focus to a textbox after the
    autopostback event of a dropdownlist. When the user changes the selection of
    my dropdownlist an onchange event occurs and the form does autopostback.
    After the on change event I need to set focus to the next textbox. How do I
    do this>
    =?Utf-8?B?VmljdG9yaW91czE=?=, Oct 29, 2007
    #1
    1. Advertising

  2. On Oct 29, 1:08 pm, Victorious1
    <> wrote:
    > I am usingVB with .net 1.1 and I wish to set focus to a textbox after the
    > autopostback event of a dropdownlist. When the user changes the selection of
    > my dropdownlist an onchange event occurs and the form does autopostback.
    > After the on change event I need to set focus to the next textbox. How do I
    > do this>


    This is C# syntax but the idea is the same for VB.

    In the page load method have this:
    Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
    "SomeName", <WebControlName>.focus());
    SE.Computerguy, Oct 29, 2007
    #2
    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. Replies:
    5
    Views:
    4,243
    Dan Brussee
    Jun 27, 2004
  2. Mel
    Replies:
    8
    Views:
    4,495
  3. Mad Scientist Jr
    Replies:
    0
    Views:
    369
    Mad Scientist Jr
    Jul 13, 2004
  4. Replies:
    2
    Views:
    325
    Thomas 'PointedEars' Lahn
    Jun 6, 2005
  5. Roger
    Replies:
    3
    Views:
    303
Loading...

Share This Page