validation

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

On my "classic asp" application I have some javascript that runs when the
user clicks Submit and verifies all the required fields are filled in and
the email, phone, and fax numbers are formatted correctly and if they're not
a message box pop's up and tells the user they missed something and then it
Sets Focus on that Field. Can I do something like that in ASP.NET?
If so can i use the same code or no? If no, can someone point me to an
example of this in ASP.NET - (VB.NET Code)

thx
 
Mike said:
On my "classic asp" application I have some javascript that runs when the
user clicks Submit and verifies all the required fields are filled in and
the email, phone, and fax numbers are formatted correctly and if they're not
a message box pop's up and tells the user they missed something and then it
Sets Focus on that Field. Can I do something like that in ASP.NET?
If so can i use the same code or no? If no, can someone point me to an
example of this in ASP.NET - (VB.NET Code)

I suppose you could use the same code, but ASP.NET has a much cleaner
solution where you can do all this stuff using your designer!

See "RequiredFieldValidator" (and others) on your MSDN.

To get you started, read:

http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=46

Steven

- - -
 
Hi,

You can use the same old method, just take care of knowing the names of the
controls.

You can also use the new Validators controls, there are easy to use.

Cheers,
 
thanks guys,
Man, going from ASP to ASP.NET is a whole new world.
With the changes, syntax, etc. I probably been better off if i was new to
programming all together.

thanks for your help
 
Mike said:
thanks guys,
Man, going from ASP to ASP.NET is a whole new world.
With the changes, syntax, etc. I probably been better off if i
was new to programming all together.

*not*

This way, you'll appreciate ASP.NET more :-)

Steven

- - -
 
Back
Top