You can't have an
"Updated Successfully" message inside of a catch. A catch statement is reserved for exceptions and you would make use of it during exception handling. You could add the finally statement but then that would always execute whether you code was successful or not.
Best option I can recommend is the following, provided your other code is working
protected void Button1_Click1(object sender, EventArgs e)
{
try
{
cg.updateuser(TextBox1.Text, TextBox2.Text, TextBox3.Text);
Label14.Text = ("Update Succesfully");
}
catch
{
Label14.Text = ("Update Failed");
}
}
please read through microsoft documentation.
http://msdn.microsoft.com/en-us/library/vstudio/0yd65esw.aspx[
^]
This will hopefully make things clearer for you