Becky Bloomwood

Becky Bloomwood

  • NA
  • 119
  • 285.8k

Redirect to another aspx page when message box button is click.

Jan 15 2011 3:43 AM

Hi ,I am doing a message box that when user clicks on the Ok button, it will redirects to another aspx page. However, I do not know what is wrong with the code.
This is the code that I have input in:
 
 

protected void btnUpload_Click(object sender, EventArgs e)
{
System.Windows.Forms.
MessageBox.Show("The Category Description has been repeated, please make the necessary changes! ", "Template", MessageBoxButtons.OK, MessageBoxIcon.None);
if (MessageBoxButtons.OK == true)
{
Response.Redirect(
"ViewCategory.aspx");
}
}
Thanks:D

Answers (7)