protected void Button1_Click(object sender, EventArgs e)
{
string ConStr = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
+ Server.MapPath(".") + @"\sc.accdb";
OleDbConnection myconn = new OleDbConnection(ConStr);
myconn.Open();
string a;
if (RadioButton1.Checked)
{ a = RadioButton1.Text; }
else { a = RadioButton2.Text; }
string sql = "insert into scorder (用户名,手机号,联系地址,身份证号,数量,订单收款类型,产品,服务方) values('"
+ TextBox1.Text + "','"
+ TextBox7.Text + "','"
+ TextBox8.Text + "','"
+ TextBox2.Text + "','"
+ TextBox3.Text + "','" + a + "','" + TableName.Value + "','" + TableName1.Value + "')";
OleDbCommand mycomm = new OleDbCommand(sql, myconn);
mycomm.ExecuteNonQuery();
myconn.Close();
TextBox1.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
<p> 服务方
<select id="TableName1" runat ="server">
<option value ="open">开发商</option>
<option value ="leju">乐居</option>
</select>