// Cancel button
tc = new TableCell();
btnCancel = new Button();
btnCancel.Text = \"Cancel\";
btnCancel.Click += new Even
Call the HttpResponse.Redirect Method.
Example:
Response.Redirect("Example.aspx");
To do exactly what you want, on the server, would be Response.Redirect. There is no need to postback though. There are a few client side solutions. Use a LinkButton, w/ onclick html attribute set to false. My recommendation is something like this though:
<INPUT TYPE="BUTTON" VALUE="Cancel" ONCLICK="window.location.href='http://www.yourdomain.com/example.aspx'">
protected void btnCanel_Click(object sender, EventArgs e)
{
Response.Redirect("example.aspx");
}