I want to set focus to an element (a button) after the user clicks on Submit, but the focus is not on a new page it is in the same page. What is happening is that when they click submit i am evaluating a few conditions.. if one of them is met I send them back to the same page (or do not re-direct) in other terms but it still postsback so, when it postsback I again after the submit, i want to set the focus to this item.. how can i do this?
Share
So you want to set the focus of the page to a WebControl on the page? i.e. a
<asp:Button>?You can use
ControlId.Focus()EDIT
If you are talking about the Scroll position after postback, then you could try this
Now I have never used it before or tried it, so not sure if it works.