I have field in sql called gender,and when i click in browser for male or female it sholud get updated in my database also..
how to do that..
guide me pls...........

simple fire a query on on Radiobutton_checkedChanged event.
show some code.

post ur code show your effort first

sorry for ur its your

simple fire a query on on Radiobutton_checkedChanged event.
show some code.

String s;

s= ds.InsertParameters.Add("gender", (RadioButton1.Checked == true) ? "Male" : "Female".ToString());


hey i am new for .net me learning myself yaar..

how to update the fields in sql database..

post your full code dear

toString() not needed think so

s= ds.InsertParameters.Add("gender", (Me.RadioButton1.Checked == true) ? "Male" : "Female");

post your full code dear

This is for to update in database..
string gender=RadioButton1.SelectedItem.Text;
conn.Open();
cmd.Connection = conn;
cmd.CommandText = "insert into employeedetail values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "''"+gender+"','" + TextBox10.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "')";
cmd.ExecuteNonQuery();
conn.Close();
Response.Write("<script>alert('record added')</script>");
Response.Redirect("Employee Official Detail.aspx");

code i given is working or not

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.