How to store radio button in database
Sir i have Coded My aspx.cs Page like this
protected void Submit_Click(object sender, EventArgs e)
{
SqlConnection cnn = new SqlConnection(@"Data Source=.\sqlexpress;Initial Catalog=basoft;Integrated Security=True;Pooling=False");
SqlCommand cmd = new SqlCommand("insert into Registration values('" +
TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text +
"','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" +
DropDownList1.SelectedValue + "','" + DropDownList2.SelectedValue + "','" +
DropDownList3.SelectedValue + "','" + TextBox8.Text + "','" + DropDownList4.SelectedValue + "')", cnn);
cnn.Open();
var n = cmd.ExecuteNonQuery();
cnn.Close();
if (n == 1)
Response.Write("<script>alert('Registration Success');</script>");
else
Response.Write("<script>alert('Registration Failed');</script>");
{
And I want to store the gender with radio button how can i code to store the gender's radio button to the database with all that textboxes values.