I have attached codes and have dropdown in aspx frontend.
What I really want to do is to put city/state in into placeholder inside of <div></div>
and show on the aspx.
How can I connect them?
How can I validate city/state? Assume if I select 5 in dropdown.
5 pairs of city/state will be shown. and I need to make sure the user enters all 5 pairs.
protected void DdlTotalLocation_SelectedIndexChanged(object sender, EventArgs e)
int TotalLocationCount = int.Parse(DdlTotalLocation.SelectedValue);
for (int i = 0; i < TotalLocationCount; i++)
TextBox CityTextBox = new TextBox();
CityTextBox.ID = "City_" + i;
TextBox StateTextBox = new TextBox();
StateTextBox.ID = "State_" + i;