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. 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. Mad Scientist Jr

    asp.net setfocus after validation not working

    Mad Scientist Jr, Jul 13, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    6,819
    Mad Scientist Jr
    Jul 15, 2004
  2. chen selina
    Replies:
    0
    Views:
    1,396
    chen selina
    Jul 13, 2010
  3. 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:
    679
    Robin Prosch via .NET 247
    Jul 3, 2004
  4. Ryan Malone
    Replies:
    0
    Views:
    192
    Ryan Malone
    Aug 23, 2004
  5. Yaiz
    Replies:
    0
    Views:
    208
Loading...

Share This Page