Welcome to Dream.In.Code
Become an Expert!

Join 149,595 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,861 people online right now. Registration is fast and FREE... Join Now!




ASP Validator

 
Reply to this topicStart new topic

ASP Validator

Thapa
10 Oct, 2007 - 11:48 PM
Post #1

New D.I.C Head
*

Joined: 24 Sep, 2007
Posts: 20



Thanked: 1 times
My Contributions
Guys I need Help to validate State and Post Code! I got Combo Box For State and textBox for PostCode! I want form level Validation, I have got following Condition!

([state]='NSW' AND [postcode]>'1999' AND [postcode]<'3000' OR [state]='TAS' AND [postcode]>'6999' AND [postcode]<'8000' OR [state]='VIC' AND [postcode]>'2999' AND [postcode]<'4000' OR [state]='NT' AND [postcode]>'0799' AND [postcode]<'0910' OR [state]='WA' AND [postcode]>'5999' AND [postcode]<'7000' OR [state]='SA' AND [postcode]>'4999' AND [postcode]<'6000')

I Know i can implement Range Validator But Don;t have Idea how to write Java Script Function for above Condition,

Could Any Body Help me how to implement this in Form Level Validation?

Happy Coding

This post has been edited by Thapa: 10 Oct, 2007 - 11:53 PM
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: ASP Validator
11 Oct, 2007 - 03:49 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,482



Thanked: 161 times
Dream Kudos: 9050
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Just use the RangeValidator Control for this, it actually validates on the client side by writing the JavaScript for you to do this.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 11:22PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month