Required Field Validator and Focus Question

D

David Hearn

I have some required field validators on a form and would like to know if
there is a way to set focus back to the field that is required if the
validator is triggered. The problem is that the validator is triggered and
displays the error message, but it may be up the form so far and out of
sight so the user never sees it unless he/she scrolls back up the page. I
know there is a validation summary, but it would be nice to have it set
focus back to the field so that the form automatically scrolled to the
correct position. Any way of doing this?

Thanks in advance!
 
B

Brock Allen

You'd have to write your own javascript for this. In ASP.NET 2.0 they can
emit this for you automatically.
 
D

David Hearn

Thanks Brock! That's what I thought. I am looking forward to ASP.NET 2.0 for
that reason and many others. I just got back from ASP.NET Connections in
Orlando a couple of weeks ago and the things that they showed us during the
conference blew me away!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top