RBS
asked on
State/Province/Country Issue MVC
Hi:
I have a website with clients from US and Canada. I've updated the code to MVC and am trying to figure out how have the dropdown for provinces-states populated with the appropriate data depending on the country that was chosen.
In my forms program, this is what fired when the Country dropdown box changed:
Any suggestions greatly appreciated!
RBS
I have a website with clients from US and Canada. I've updated the code to MVC and am trying to figure out how have the dropdown for provinces-states populated with the appropriate data depending on the country that was chosen.
In my forms program, this is what fired when the Country dropdown box changed:
private void PopulateState_Provinces(string Country_Code)
{
if (Country_Code == "US")
{
lblProvince.Text = "State:Country";
lblPostalCode.Text = "Zip Code";
}
else
{
lblProvince.Text = "Province:Country";
lblPostalCode.Text = "Postal Code";
}
DataTable dtProvinces = DataAccess.Provinces_GetAll(Country_Code);
drpProv_Code.DataSource = dtProvinces;
drpProv_Code.DataValueField = "Prov_Code";
drpProv_Code.DataTextField = "ListName";
drpProv_Code.DataBind();
}
Any suggestions greatly appreciated!
RBS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
RBS