Mobile Asp.net 2.0 SetFocus()

Discussion in 'ASP .Net Mobile' started by David Williamson, Mar 27, 2006.

  1. I'm trying to focus a control on a Mobile web page. I have tried using
    Page.SetFocus() and txtScan.Focus() but I keep geting the following error:

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



    Here is my source code:

    <mobile:Form id="Form1" runat="server">
    <mobile:TextBox ID="txtScan" Runat="server">
    </mobile:TextBox>
    </mobile:Form>
     
    David Williamson, Mar 27, 2006
    #1
    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. Mad Scientist Jr

    asp.net setfocus after validation not working

    Mad Scientist Jr, Jul 13, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    7,034
    Mad Scientist Jr
    Jul 15, 2004
  2. Jeff
    Replies:
    1
    Views:
    365
    William LaMartin
    Sep 24, 2006
  3. chen selina
    Replies:
    0
    Views:
    1,634
    chen selina
    Jul 13, 2010
  4. Steve Brown

    Use ASP.Net or ASP.Net Mobile for TabletPC

    Steve Brown, Sep 2, 2003, in forum: ASP .Net Mobile
    Replies:
    2
    Views:
    372
    George Birbilis
    Oct 22, 2003
  5. Robin Prosch via .NET 247

    setfocus on mobile textbox for barcode scanning

    Robin Prosch via .NET 247, Jul 3, 2004, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    816
    Robin Prosch via .NET 247
    Jul 3, 2004
  6. Ryan Malone
    Replies:
    0
    Views:
    301
    Ryan Malone
    Aug 23, 2004
  7. Yaiz
    Replies:
    0
    Views:
    341
  8. dawson
    Replies:
    0
    Views:
    315
    dawson
    Jul 12, 2005
Loading...