Guest User

Untitled

a guest
Nov 30th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. SqlConnection con = new SqlConnection(@"Data Source=jolla;Initial Catalog=Logdb;user id=sa;password=jolla;Integrated Security=True");
  2. if (txt1.Text != "")
  3. {
  4. con.Open();
  5. SqlCommand cmd = new SqlCommand("update dbo.Imgtable1 Set Username='" + Nuser.Text + "', Email='" + Nemail1.Text + "', Mobile='" + Nmobile1.Text + "', Image='" + name+ "' where Username='" + txt1.Text + "' or Email='" + txt1.Text + "'", con);
  6. cmd.ExecuteNonQuery();
  7. cmd.Dispose();
  8. Clear();
  9. }
  10. else
  11. {
  12. Response.Write("Text Field Empty");
  13. txt1.Focus();
  14. }
  15. }
Add Comment
Please, Sign In to add comment