View Single Post
Join Date: Nov 2006
Posts: 436
Reputation: JerryShaw is on a distinguished road 
Solved Threads: 72
JerryShaw JerryShaw is offline Offline
Posting Pro in Training

Re: populate two dropdownlist

 
0
  #5
Dec 1st, 2007
You need to specify what country to use when you pull the data for the second drop down.

  1. string sql = "SELECT stateid,statename FROM countrystate where country_id='{0}' ";
  2. SqlDataAdapter da1 = new SqlDataAdapter( string.Format(sql,countryid) );

This way it will only contain the states for that country.
Reply With Quote