I have a page that starts off with a ComboBox, and I need focus to go into that combobox automatically when the page loads so that the user does not have to initiate a mouse click.
My ComboBox looks like this:
I tried this to set the focus into it on page load:
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Me.ComboBox1.Focus()
End If
End Sub
And I also tried a javascript approach like this:
But nothing has worked. What am I missing?
Thanks in advance,
Jon