so what's the trick to making 'defaultfocus' work?

  • Thread starter Thread starter Chris Marsh
  • Start date Start date
C

Chris Marsh

I am expecting it to automatically put the cursor in the field I am entering
but it doesn't I still have to tab to get to that field. I was hoping that
I could set the focus, buttons and tab orders just like a regular Windows
form in my web page.

Thank you in advance!
 
Hello Chris,

In Page_Load you can call the Focus() method on the control to set the
default focus:

protected void Page_Load(object sender, EventArgs e)
{
Button1.Focus();
}

To reorder the tab order you should be able to use the TabIndex property.
 
Back
Top