views:

43

answers:

1

Hello Friends,

I am showing Custom Error in my page.. if somehting happend wrong. but if the same error occured in my subview master page I am not able to show the Custom error page on Entire page its showing me that Error page under subview master page. Please I am attching the Screen shot.

Can any body help me out how to show the Error page on entire page if something happend in any where submaster or other page..

Here is the code that I am using in web config file to show custom Error page..

<customErrors mode="On" defaultRedirect="~/Home/Error">
  <error statusCode="403" redirect="~/Home/Error" />
  <error statusCode="404" redirect="~/Home/Error" />
</customErrors>

master page I have

all the js files and Css files links

and I have submaster page for mainmaster page.. sub master page have three tabs each tab has grid control.if something went wrong I can able to show the Custom Error page but its showing me in submaster page.. not in main master page.....but if something hapend any where I need to show CustoM Error page in main master page..

Thanks

Thanks

+1  A: 

This issue is occurring because you are using AJAX to partially load the contents of the tabs after the initial page load so the error is occurring AFTER your master page has been loaded.

What you need to do is provide a javascript function to handle the error after the ajax call has returned and redirect to the error page.

I'm not sure what javascript framework you're using, but most frameworks allow you to specify callbacks for success and error handling.

lomaxx