protected void gridStud_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
LinkButton btn = (LinkButton)gridStud.Rows[e.RowIndex].FindControl("linkUpdate");
int studentId = Convert.ToInt32(gridStud.DataKeys[e.RowIndex].Value.ToString());
TextBox txtStudName = (TextBox)gridStud.Rows[e.RowIndex].FindControl("txtStud");
RadioButton rd1 = (RadioButton)gridStud.Rows[e.RowIndex].FindControl("RadioButton3");
RadioButton rd2 = (RadioButton)gridStud.Rows[e.RowIndex].FindControl("RadioButton4");
TextBox txtBirthdate = (TextBox)gridStud.Rows[e.RowIndex].FindControl("txtDate");
TextBox txtEmail = (TextBox)gridStud.Rows[e.RowIndex].FindControl("txtEmail");
TextBox txtMobile = (TextBox)gridStud.Rows[e.RowIndex].FindControl("txtmob");
studentCommon c = new studentCommon();
SqlCommand cmd = new SqlCommand("studIUD");
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("StatementType", "UPDATE");
// cmd.Parameters.AddWithValue("studentId", studentId);
cmd.Parameters.AddWithValue("name", txtStudName);
if (rd1.Checked)
{
cmd.Parameters.AddWithValue("gender", "Male");
}
else
{
cmd.Parameters.AddWithValue("gender", "Female");
}
cmd.Parameters.AddWithValue("brithDate", txtBirthdate);
cmd.Parameters.AddWithValue("emailid", txtEmail);
cmd.Parameters.AddWithValue("mobilenumber", txtMobile);
c.ExecuteNonQueryByCommand(cmd);
gridStud.EditIndex = -1;
gridStud.DataBind();
}
Dhimesh ParmarPosted Mar 3, 2018, 2:22 AM
Rajneesh ChaubeyPosted Mar 2, 2018, 4:29 AM
Dhimesh ParmarPosted Mar 2, 2018, 3:41 AM
Rajneesh ChaubeyPosted Mar 2, 2018, 12:55 AM
Dhimesh ParmarPosted Mar 1, 2018, 9:10 PM
Rajneesh ChaubeyPosted Feb 28, 2018, 12:13 PM
Laxmidhar SahooPosted Feb 28, 2018, 9:57 AM
Laxmidhar SahooPosted Feb 28, 2018, 9:55 AM