Monday, April 27, 2009

Setting TextBox Focus when using UpdatePanels

Try as I might TextBox1.Focus() would not give TextBox1 focus after an AsyncPostBack. Placing a breakpoint on that particular like of code showed that the code was executing, but alas... no blinking cursor. The solution to this problem is to use the ScriptManagers Focus()! ScriptManager1.SetFocus(TextBox1) gave me the results I was looking for.

No comments:

Post a Comment