Hello, I found this part of coding and would like to confirm whether my understanding is correct or not. When the page is run/open, the query of username is extract and a column name verified is updated in the table name users, if the column name username in the table users has the same value as the extract value from query string?
protected void Page_Load(object sender, EventArgs e)
{
string usernamequerystring = Request.QueryString["username"].ToString();
SqlConnection myConnection = new SqlConnection(GetConnectionString());
SqlCommand storeimage = new SqlCommand("UPDATE users SET verified='YES' WHERE username=@usernamequerystring)", myConnection);
storeimage.Parameters.Add("@usernamequerystring", SqlDbType.VarChar, 50).Value = usernamequerystring;
try
{
myConnection.Open();
storeimage.ExecuteNonQuery();
Label1.Visible = true;
Label1.Text = "Account Activated.";
}
catch
{
//catch block goes here
}
}
and a ...
Go to the complete details ...