I have a page and in that page i have several user controls, so one of them validates a textbox to see if its empty it works fine… but then i have other controls… and one of them has the submit button, so what i want to do is when the button is clicked if the textbox is empty (and it validates correctly) to jump to that section of the page so that the user can see the error.
Right now it is just showing the message but it is all the way down in the page so the error is there, the user is clicking and clicking but does not know the problem is at the top…
How can I focus on that textbox in that control… when clicking on the submit button which is in another control but they are still both in the same page?
I hope you understand the issue if not please ask and i will be happy to assist with more information.
Here is a way to set focus, put this function in
OnClientClickof an ASP.NET button control:Manually calling ASP.NET Validation with JavaScript