TextBox Focus

Last post 07-07-2009 6:35 AM by Bullonprowl. 4 replies.

Sort Posts:

  • TextBox Focus

    07-07-2009, 1:40 AM

     

    Hi,

    I am new in asp.net Mobile web forms, I don't  know how to focus a particular textbox while page load any one Help me.

     

    Ramesh.D
    http://rameshduraikannu.blogspot.com
  • Re: TextBox Focus

    07-07-2009, 4:35 AM
    • Member
      588 point Member
    • s.sriram
    • Member since 02-27-2007, 8:38 AM
    • India
    • Posts 91

    Hello,

    Try this..


    document.Form1.TextBox1.focus()


    Hope it helps.

    S.SRIRAM
  • Re: TextBox Focus

    07-07-2009, 4:36 AM
    • Member
      75 point Member
    • saurabh2k4mc095
    • Member since 10-03-2008, 8:00 AM
    • New Delhi
    • Posts 19

    Hi Ramesh,

    write the code on the page load event

    TextBox1.focus();

    where TextBox1 is the id of the text box

    Remember to click “Mark as Answer” on the post, if it helps you. Because It helps others to find the solution

    Thanks.
    ~Saurabh
  • Re: TextBox Focus

    07-07-2009, 5:10 AM

     

    Thank's for reply,

    I tried this

    TextBox1.focus() i got the following error.

    A form tag with runat=server must exist on the Page to use SetFocus() or the Focus property. 

    I asked in Mobile Web form  Textbox.

     

    Ramesh.D
    http://rameshduraikannu.blogspot.com
  • Re: TextBox Focus

    07-07-2009, 6:35 AM
    Answer
    • Member
      332 point Member
    • Bullonprowl
    • Member since 08-16-2005, 6:04 AM
    • Chennai
    • Posts 87

    hi rameshduraikannu,

    Setfocus() or Focus() is not supported in Mobile Web Forms. It cannot be used in Mobile Web Forms. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=113661 Check out the reply given here by Microsoft. 

    Regs,
    Bharani

    Please mark this post as "Answer" if it helped to solve your problem, so that others can also find it usefull while searching.
Page 1 of 1 (5 items)