control.focus() after selectedIndexChanged
- by kyle
I need to focus on a textbox after an item has been selected from a dropdownlist.
I've tried control.focus() and setfocus().
The last thing I've tried was Set_Focus(dtbEffectiveDate.ClientID) inside the SelectedIndexChanged method with the folowing method.
Protected Sub Set_Focus(ByVal ControlName As String)
Dim strScript As String
strScript = "<script language=javascript> window.setTimeout(""" + ControlName + ".focus();"",0); </script>"
RegisterStartupScript("focus", strScript)
End Sub
I'm out of answers so any help would be awesome.