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. Advertising

  2. JAPHET

    Saravana Guest

    Saravana, Oct 29, 2004
    #2
    1. Advertising

  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. 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. Manav
    Replies:
    0
    Views:
    767
    Manav
    Oct 15, 2003
  2. 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:
    166
    Saud Bahwan Group Computer Services Dept
    Nov 9, 2003
  3. Oscar

    Set Focus control in Visual Studio 2005 Web Form

    Oscar, May 19, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    156
    Oscar
    May 19, 2006
  4. Replies:
    2
    Views:
    328
    Thomas 'PointedEars' Lahn
    Jun 6, 2005
  5. Roger
    Replies:
    3
    Views:
    309
Loading...

Share This Page