7
Reply

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

Becky Bloomwood

Becky Bloomwood

Jan 15 2011 3:43 AM
10k

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)