#1
  1. No Profile Picture
    Steve Schofield
    Guest
    ASP Mastermind (5000+ posts)

    How to set focus on a webform textbox


    <i><b>Originally posted by : rreineker (raffy-r@gmx.de)</b></i><br />I want to set the focus on a webform textbox with C# after the page has load.<br /><br />how can I do thia?<br /><br />rreineker<br />
  2. #2
  3. No Profile Picture
    Steve Schofield
    Guest
    ASP Mastermind (5000+ posts)
    <i><b>Originally posted by : Origins Tech Team (via site)</b></i><br />Create a HTMLInputHidden Control and use as a bool. Set the value in the C# inside the event where the focus will need to be changed on the page.<br /><br />Test the value of this hidden field using a JS function called OnLoad. For example if bool is "TRUE" then set the focus of the desired control on the page.<br /><br />Working sample of this code can be found at www.englishorigins.com/loginnewuser.aspx<br /><br />PS: We accept no responsibility for this code and its use.<br /><br />Good luck!<br />------------<br />rreineker at 4/18/2002 3:30:12 AM<br /><br />I want to set the focus on a webform textbox with C# after the page has load.<br /><br />how can I do thia?<br /><br />rreineker<br />

Similar Threads

  1. searching database using several textbox
    By adriana in forum .NET Development
    Replies: 4
    Last Post: January 7th, 2004, 11:34 AM
  2. setting focus
    By yessir in forum ASP Development
    Replies: 4
    Last Post: December 24th, 2003, 08:35 AM
  3. Help on textbox get focus
    By planoly in forum ASP Development
    Replies: 1
    Last Post: November 17th, 2003, 03:40 AM
  4. get text from a textbox
    By alina in forum .NET Development
    Replies: 3
    Last Post: May 31st, 2003, 02:48 PM
  5. Replies: 0
    Last Post: June 18th, 2002, 08:43 AM

IMN logo majestic logo threadwatch logo seochat tools logo