Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 3rd, 2006, 12:36 PM
Registered User
 
Join Date: Feb 2005
Location: city, state, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default selective validation Country/State

i have a 2 combobox and a 1 textbox and a search button

1) country combobox
2) state combobox
3) textbox

when user click on search button without entering anything in the textbox then i'm inforcing user to enter (1) country and (2) city name (first 3 characters) which works great but i have a new requirement:

when the user select country = "United States" then i have to make sure user select

1)Country
2)State
3) city name (first 3 characters)

how do i do that?

the best example is here

http://www.peterblum.com/vam/DemoAll.aspx

when you select "united states" or "canada" the STATE required field is popup

same exact thing i want to implement


  #2 (permalink)  
Old August 6th, 2006, 10:34 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

In the example it looks like the state textbox and validator control are enabled or disable on selection of the country.

  #3 (permalink)  
Old August 9th, 2006, 11:51 AM
Authorized User
Points: 333, Level: 6
Points: 333, Level: 6 Points: 333, Level: 6 Points: 333, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Fresno, California, USA.
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The Country dropdown has "Enable AutoPoastback" set to true it looks like. The postback form selection changed for that control either enables the state field and validaton control or disables it. Looks like the validation control has some extra code to change the textbox color too. Similar to what I do with my controls except I actually hide them too. I see postback everytime the control is changed so there is no Ajax involved which makes it straight forward. :)


  #4 (permalink)  
Old August 9th, 2006, 04:01 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Yep.. not too hard to implement.. :)


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
select country in drop down and state accordingly vinodonline2000 ASP.NET 2.0 Basics 4 September 11th, 2007 09:42 AM
Problem with selective counting still_learning XSLT 1 March 22nd, 2007 06:27 PM
selective validation Country/State dsmportal ASP.NET 1.0 and 1.1 Professional 0 August 3rd, 2006 12:35 PM
Session State|View State|Do I have other options? rockon ASP.NET 1.x and 2.0 Application Design 2 October 5th, 2005 07:10 PM
Tip! Drop down "State", "Country" selections larry HTML Code Clinic 0 January 1st, 2004 11:23 AM



All times are GMT -4. The time now is 06:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.