0

I use VS2010,C# to develop ASP.NET web app, I have some two text boxes, two buttons and a checkbox in one of my pages, but I want one of my text boxes to have initial focus when page loads, so that cursors blinks in this text box and when users presses keys, this text box receives keys, I've changed tab index of my controls so that the desired text box has tab index = 0, but still no luck, what should I do?

Ali_dotNet
  • 3,219
  • 10
  • 64
  • 115

1 Answers1

1

Ideally tabIndex property should work. If not then you can manually set the focus by writing a small piece of javascript/jQuery code. For more : How do you automatically set the focus to a textbox when a web page loads?

Community
  • 1
  • 1
Pawan Mishra
  • 7,212
  • 5
  • 29
  • 39