I'm using visual studio 2010 and sql server.
I have asp.net application using VB as the language.
So I have a web form with some with these asp controls on it.
A user enters the items in. If their Mailing Address is the same as their physical address
then they check the checkbox and the Physical Addres, Physical City, Physical State, and Physical ZipCode are copied from those textboxes and dropdownlist and then fill the mailing ones.
Textbox: Physical Address
Textbox: Physical City
DropDownList: Physical State
Textbox: Physical Zip Code
Checkbox: Mailing Address Same As Physical
Textbox: Mailing Address
Textbox: Mailing City
DropDownList: Mailing State
Textbox: Mailing Zip Code
All the textboxes are varchar(100)
The dropdownlist contain int value, they are the PhysicalState_PK and MailingState_PK columns from the CustomerTable
The data comes from a table called CustomerTable
which looks something like this:
the PhysicalState and MailingState columns from the customer table use the value in those columns to lookup the state from the table called StatesTable which looks like this:
In my form I have a checkbox event called Protected Sub cboxPhysicalAsMailing_Chec
I have an if statement that looks like this:
Me.txtMailingAddr.Text = txtPhysicalAddr.Text
Me.txtMailingCity.Text = txtPhysicalCity.Text
edIndex = ddlPhysicalStates.Selected
Me.txtMailingZipCode.Text = txtPhysicalZipCode.Text
So when I check the checkbox I want all the values from the Physical items copied to the Mailing items on the form.
When I check the checkbox I notice that all the values of the textboxes are copied successfully but the only one not working is the dropdownlist called ddlMailingStates
How would I handle copying the value from the dropdownlist called ddlPhysicalStates
and then filling my dropdownlist called ddlMailingStates
with the same value?