ASP .Net 4.5 - Need to load an appropriate master page for an error page

Discussion in 'Getting started' started by Ankit Shah, Feb 17, 2014.

  1. Hello everyone,

    We have implemented two master pages, parent master page (without menu) and child master page (with menu). Whenever any error occurs throughout the website, we redirect the request to the error page. Some of our website pages are configured with the parent master page and remaining with the child master page. The error page is a common page where we would like to identify the requester page and it’s master page. So that, the same master page can be configured dynamically on error page.

    The same query was also put in the below forum too.

    http://forums.asp.net/p/1963380/561...an+appropriate+master+page+for+an+error+page+

    I tried with this.PreviousPage.MasterPageFile, but it is null in my case. Any other possible solution. Can anybody also response me on the queries that I put on the above post?
     

Share This Page