Error on Asp.Net page

  • Thread starter Thread starter ntuyen01
  • Start date Start date
N

ntuyen01

Hi All,

I create a long form, (user have to Scroll down to Click the submit
button) on the form i have couple fields using the control
"RequiredFieldValidator". Now the user click on the "submit" button,
error will display if the user does not enter the required field (it
works fine), but the user does not see the error unless they scroll up
the form. Is there a way in the asp.net to make the page go up to the
top or to the error field so the user does not have to scroll up or
wonder what going on


Thank You
Regards,
ntuyen01
 
if you use custom validators, or validators that are processed in a postback
(not the dynamic ones), you can then do a
Server.Transfer("page.aspx#errorNumber"); and it will postback and jump to
the error. It won't be as fluid as the dynamic ones but it'll work.

The other alternative is to put in a validation Summary control where your
submit button is outlining what went wrong and that could point them to the
right field also.
 
if you use custom validators, or validators that are processed in a
postback
(not the dynamic ones), you can then do a
Server.Transfer("page.aspx#errorNumber"); and it will postback and jump to
the error. It won't be as fluid as the dynamic ones but it'll work.


You mean on the Postback I need to check each required field to make
sure the user enter or not.
 
Back
Top