Set Focus on Web Form.

Discussion in 'ASP .Net' started by JAPHET, Oct 29, 2004.

  1. JAPHET

    JAPHET Guest

    Plz Help
    How to set focus on a text box for VB.Net web form.
    Thanx in Advance.
     
    JAPHET, Oct 29, 2004
    #1
    1. Advertisements

  2. JAPHET

    Saravana Guest

    Saravana, Oct 29, 2004
    #2
    1. Advertisements

  3. JAPHET

    Shiva Guest

    There is one way:

    In the .aspx file, add the onLoad attribute as in:

    <body onLoad="document.forms[0].<%= TextBox.ClientID %>.focus();">
    ....

    "JAPHET" <> wrote in message
    news:...
    Plz Help
    How to set focus on a text box for VB.Net web form.
    Thanx in Advance.
     
    Shiva, Oct 29, 2004
    #3
    1. Advertisements

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. Chris
    Replies:
    0
    Views:
    474
    Chris
    Nov 10, 2003
  2. feng
    Replies:
    5
    Views:
    243,913
    Rajiv R
    Feb 27, 2004
  3. bienwell
    Replies:
    4
    Views:
    4,290
    bienwell
    Dec 2, 2005
  4. Manav
    Replies:
    0
    Views:
    960
    Manav
    Oct 15, 2003
  5. Saud Bahwan Group Computer Services Dept

    How to set focus in the Mobile Web Forms/Web Controls

    Saud Bahwan Group Computer Services Dept, Nov 9, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    298
    Saud Bahwan Group Computer Services Dept
    Nov 9, 2003
  6. Oscar

    Set Focus control in Visual Studio 2005 Web Form

    Oscar, May 19, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    249
    Oscar
    May 19, 2006
  7. Replies:
    2
    Views:
    545
    Thomas 'PointedEars' Lahn
    Jun 6, 2005
  8. Roger
    Replies:
    3
    Views:
    620
Loading...