Skip to content

Redirect To Action Without Changing URL MVC

Smart    Lucky

Smart Lucky

Asked Jun 24, 2014, 4:16 AM EDT2 answers
Share
LinkedInX
Hi
dudes i am using mvc3 , i have create application level event for exception of errors as below,

protected void Application_Error(object sender, EventArgs e)
{
Response.Redirect("~/PageNotFound/Custom404");

}

suppose i am typing url (localhost:23/xyz/abc/test(what ever)
it is showing custom404 page , but i want show this page but without change url can any one help me
please.

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Umesh Kumar
    0
    Use Server.Transfer insteaedirect
    0
  • Smart    Lucky
    0
    Server.Transfer Throughing Exception Error executing child request for /PageNotFound/Custom404.
    0