validation

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
 
S

Steven Spits

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

- - -
 
I

Ignacio Machin \( .NET/ C# MVP \)

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,
 
M

Mike

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
 
S

Steven Spits

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

- - -
 

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
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top