Monday, March 26, 2012

Preserving focus on UpdatePanel update

Hello, ?I would like to be able to update an UpdatePanel?on?one?part?of?the?screen?while?users?are?writing?into?a?textbox?on?another?part?of?the?screen.

When I do that now, the textbox in which the user is entering text loses focus whenever UpdatePanel updates (once every 5 seconds on account of a Timer control within the updatepanel)

How can I preserve focus?

Yours
Andreas KnudsenIf the textbox is also within anoother Update Panel (or ths ame one), trye moving it out. In the worst case you can use Scriptmanager.SetFocus from the server side code.
If the textbox is also within anoother Update Panel (or ths ame one), try moving it out. In the worst case you can use Scriptmanager.SetFocus from the server side code.
The TextBox is outside any UpdatePanel,

I do not want to always set the focus to a?particular textbox, but to
preserve the focus on whichever textbox the user is using as the UpdatePanel happens to Update.

Is that possible at all?

No comments:

Post a Comment