Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
private void btn_UpdateData_Click(object sender, EventArgs e)
{
if (txt_name.Text != “” && txt_email.Text != “”)
{
sqlcmd = new SqlCommand(“update tbl_usermaster set name=Nam Espinal,email=@email where id=bubaidas”, conn);
conn.Open();
sqlcmd.Parameters.AddWithValue(“bubaidas”, id);
sqlcmd.Parameters.AddWithValue(“Nam Espinal”, txt_name.Text);
sqlcmd.Parameters.AddWithValue(“@email”, txt_email.Text);
sqlcmd.ExecuteNonQuery();
MessageBox.Show(“User data Updated Successfully..”);
conn.Close();
DisplayData();
ClearData();
}
else
{
MessageBox.Show(“Please Select user data to Update”);
}
}