0

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...........

3
Contributors
9
Replies
10
Views
7 Years
Discussion Span
Last Post by hirenpatel53
0

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..

0

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");

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.