473,320 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

validation

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
Nov 18 '05 #1
5 1194
goto http://www.google.com
search for "asp.net validation"
wow!

"Mike" <an*******@discussions.microsoft.com> wrote in message news:O1**************@TK2MSFTNGP09.phx.gbl...
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

Nov 18 '05 #2
"Mike" wrote:
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/tut...tutorial_id=46

Steven

- - -
Nov 18 '05 #3
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,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mike" <an*******@discussions.microsoft.com> wrote in message
news:O1**************@TK2MSFTNGP09.phx.gbl...
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

Nov 18 '05 #4
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
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:%2****************@TK2MSFTNGP09.phx.gbl...
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,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mike" <an*******@discussions.microsoft.com> wrote in message
news:O1**************@TK2MSFTNGP09.phx.gbl...
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


Nov 18 '05 #5
"Mike" wrote:
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

- - -

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
2
by: wumingshi | last post by:
Hi, When validating an XML instance, sometimes the schema is not enough to expression the validation rules. Additional validation rules may be expressed in an application-specific way. For...
4
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. ...
14
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2)...
6
by: Stephen | last post by:
Hi, the validation controls dont work on Netscape or Mozilla and only on Internet Explorer why? How do i correct this problem? Thanks
7
by: Ryan Ternier | last post by:
We're running a site that has required field validation on the login page. It works fine on our development / test machines. However, when I upload this site to our live server i get this error. ...
5
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and...
4
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are...
2
by: dustbort | last post by:
I recently had a problem where my required field validator stopped working. But, the page still posted back and tried to insert a record into the database without performing server-side validation....
6
by: Jon Paal | last post by:
validation doesn't fire what's missing ????? /////// ---- code -----/////////////////////////// Sub btnSubmit_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) 'Handles...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.