Setfocus in ASP 2.0 not working

Discussion in 'ASP .Net Web Controls' started by Pizmo, Nov 13, 2007.

  1. Pizmo

    Pizmo Guest

    I have a contact.aspx page that is built with the wizard. It contains four
    pages, Contact Info, Comments, Summary and Complete. Everything works great
    only I cannot set the focus on any of the pages. I have tried
    defaultfocus="txtName" in the body tag, and the following in code-behind:

    Protected Sub Page_Load(ByVal sender As Object, _
    ByVal e As System.EventArgs)
    If Not Page.IsPostBack Then
    SetFocus(txtName)
    End If

    End Sub

    Any help setting the focus on two of the pages would be greatly appreciated.

    TIA
     
    Pizmo, Nov 13, 2007
    #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. Jurjen de Groot

    SetFocus

    Jurjen de Groot, Jun 29, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    641
    dmedina
    Jun 30, 2003
  2. jamess

    asp setfocus and performance

    jamess, Oct 30, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    454
    Saravana [MVP]
    Oct 30, 2003
  3. jaffer the but

    setfocus eh ! help

    jaffer the but, Apr 14, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    575
    Lars Netzel
    Apr 14, 2004
  4. Mad Scientist Jr

    asp.net setfocus after validation not working

    Mad Scientist Jr, Jul 13, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    6,823
    Mad Scientist Jr
    Jul 15, 2004
  5. David Williamson

    Mobile Asp.net 2.0 SetFocus()

    David Williamson, Mar 27, 2006, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    150
    David Williamson
    Mar 27, 2006
Loading...

Share This Page