Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Jul 10, 2007 04:09 PM|LINK
Let me explain my scenario and the things that I have already tried:
I am on .Net 2.0 with latest verion of AJAX.
The page is based off of a master page. The textbox is inside an user control which is inside a TabPanel. The User Control is encapsulated with a AJAX UpdatePanel.
I have tried the following solution for setting focus to textbox etc
1. Page.From.DefaultFocus = TextBox.ClientID and it seems to be doing nothing. It does not give any error, but doe snot setfocus to the textbox. This has been added in the page-load event.
If I try the above code to setfocus to a default textbox, the application does nothing. No error, nothing. If you see the view source below below the clientid of the textbox is correct w.r.t. its control hierarchy.
ScriptManager.RegisterClientScriptBlock(Page, sender.GetType(), "FocusScr", "WebForm_AutoFocus('" + TBLastName.ClientID + "');", True)
This gives an error in indicating object required.
Any help or direction to tackle this issue will be appreciated.
Thanks in advance