|
-
Sep 17th, 2008, 02:30 PM
#1
Thread Starter
Member
[RESOLVED] Using AJAX / net2.0 / Cant setFocus on textbox
Hey guys,
First my environment is using AJAX and .net 2.0 framework. I have a button that toggles between showing a dropdown or a textbox. Basically the button is clicked, if the dropdown is visible, hide it and show the textbox and vice versa...
My issue is neither one of these code options are working.
1) page.SetFocus(txtInsertTime) doesn't work.
2) System.Web.UI.ScriptManager.RegisterClientScriptBlock _
(Me.txtInsertTime, Me.GetType(), "FocusOnTimeTB", "document.form1['txtInsertTime'].focus();", True)
I think its something do to with the AJAX and that the control becomes
visible after the script .setfocus happens...
In code I do set Me.txtInsertTime.Visible = True before I call page.SetFocus(txtInsertTime). And, I'm using page.SetFocus() other places but the controls are visible all the time...
Anyone have a solution, another way?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|