I'm trying to set focus on a text box that's on a tab panel.
I can find the control by using
Dim t As System.Web.UI.WebControls.TextBox = CType(tc1.Tabs(0).FindControl("t1"), TextBox)
but I cannot set focus to the textbox... I get no errors when using t.focus it just won't place the cursor inside the text box
anyone know how to set focus inside a tab panel ?
thanks for your help
Comments: You can execute code above inside OnClientActiveTabChanged event handler. An example can be found here: http://ajaxcontroltoolkit.codeplex.com/SourceControl/latest#AjaxControlToolkit.SampleSite/Tabs/Tabs.aspx
I can find the control by using
Dim t As System.Web.UI.WebControls.TextBox = CType(tc1.Tabs(0).FindControl("t1"), TextBox)
but I cannot set focus to the textbox... I get no errors when using t.focus it just won't place the cursor inside the text box
anyone know how to set focus inside a tab panel ?
thanks for your help
Comments: You can execute code above inside OnClientActiveTabChanged event handler. An example can be found here: http://ajaxcontroltoolkit.codeplex.com/SourceControl/latest#AjaxControlToolkit.SampleSite/Tabs/Tabs.aspx