I have written an exercise which is a UserDatabase with register/login and update/delete buttons.
I display my data in a GridView and I would like the GridView to refresh after the buttons have been clicked.
I have the idea that it is the use of Postback but don't really know how to use it.
Could I please have some guidance? How to write that code-snippet?When and where is it used?
My exercise code-snippet for the update button is:
protected void ButtonUpdate_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = @"Data Source.....";
con.Open();
int Id = int.Parse(TextBoxId.Text);
string usN = TextBoxUserName2.Text;
string oPW = TextBoxOldPassword.Text;
string nPW = TextBoxNewPassword.Text;
string update = "UpdateUser";
SqlParameter sqId = new SqlParameter(" ...
Go to the complete details ...