Set Focus to Control Using ScriptManager

Posted: October 6, 2010 in AJAX, ASP.Net

When trying to set focus to a control with AJAX, you can try the following:
ASP.Net (Code Behind)

' Declare variables
Dim lscr_mgr As ScriptManager = ScriptManager.GetCurrent(Page)
lscr_mgr.SetFocus([your_control_name].ClientID)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s