D
dan m
I HAVE looked around but cant figure out the stupid mistake I'm
making. I am POSTing a form and in the CodeBehind function for the
submit i am simply building a SQL statement, however, I cant seem to
retrieve the correct (newly selected) values for the dropdownlist
controls. I'm sorry, i know this is elementary but I just cant see my
error - anyone give me the lowdown?!
SQL string below: (Im trying both the selected item & index but both
give the original value when first rendered)...
INSERT INTO Team " +
"(TeamName, Email, fkManufacturerId," +
"fkDriver1Id, fkDriver2Id, fkDriver3Id," +
"fkTyreId,Paid) " +
" VALUES " +
"('" + txtTeamName.Text + "'," +
"'" + txtUserId.Text + "'," +
ddlManufacturer.SelectedIndex + "," +
ddlDriver1.SelectedItem.Value + "," +
ddlDriver2.SelectedItem.Value + "," +
ddlDriver3.SelectedItem.Text + "," +
ddlTyre.SelectedItem.Value + "," +
"False);";
cheers, dan
making. I am POSTing a form and in the CodeBehind function for the
submit i am simply building a SQL statement, however, I cant seem to
retrieve the correct (newly selected) values for the dropdownlist
controls. I'm sorry, i know this is elementary but I just cant see my
error - anyone give me the lowdown?!
SQL string below: (Im trying both the selected item & index but both
give the original value when first rendered)...
INSERT INTO Team " +
"(TeamName, Email, fkManufacturerId," +
"fkDriver1Id, fkDriver2Id, fkDriver3Id," +
"fkTyreId,Paid) " +
" VALUES " +
"('" + txtTeamName.Text + "'," +
"'" + txtUserId.Text + "'," +
ddlManufacturer.SelectedIndex + "," +
ddlDriver1.SelectedItem.Value + "," +
ddlDriver2.SelectedItem.Value + "," +
ddlDriver3.SelectedItem.Text + "," +
ddlTyre.SelectedItem.Value + "," +
"False);";
cheers, dan