Click here to Skip to main content
15,917,862 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
public void authorititescontacted()
{
SqlCommand cmd = new SqlCommand("Proc_Anti_Ragging1", con);
cmd.CommandType = CommandType.StoredProcedure;
string collegeId = Session["CollegeId"].ToString();
cmd.Parameters.AddWithValue("@CollegeId", collegeId);
cmd.Parameters.AddWithValue("@Qtype", 2);
cmd.Parameters.AddWithValue("@authoritites_Name", txtauthorititesname.Text);
cmd.Parameters.AddWithValue("@authoritites_Designation", txtauthorititesdesig.Text);
cmd.Parameters.AddWithValue("@authoritites_Contact", txtauthorititescontact.Text);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
cmd.Parameters.AddWithValue("@authoritites_Name", txtauthorititesname1.Text);
cmd.Parameters.AddWithValue("@authoritites_Designation", txtauthorititesdesig2.Text);
cmd.Parameters.AddWithValue("@authoritites_Contact", txtauthorititescontact3.Text);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}

What I have tried:

i want o insert data in database column is same but when textbox id change then row will change in database

below is my code please help
Posted
Updated 22-Mar-17 22:08pm
v3
Comments
Karthik_Mahalingam 23-Mar-17 3:06am    
Not clear!
Michael_Davies 23-Mar-17 3:14am    
Hi, blanked out the user, password and public IP address of your SQL server, dangerous to reveal such details anywhere online.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900