Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:25:16+00:00 2026-06-04T22:25:16+00:00

I am currently adding exception management inside of our application. In the application I

  • 0

I am currently adding exception management inside of our application.

In the application I have a layout that basically shows a news section that is rendered via @Html.Action("news") so far when an exception occurs I can show an error message on the news section saying “well it crashed” but it’s not quite the best appeal…

Is it possible to detect it at the parent level and redirect to an error page if a child action encountered an exception?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:25:18+00:00Added an answer on June 4, 2026 at 10:25 pm

    This is what I did. Got this from a similar type of question on SO (not sure which one).

    public ActionResult TabInfo(int id, string tab)
        {
            try
            {
                var viewModel = _viewModelManager.GetViewModel(tab, id);
    
                ViewBag.Jobid = id;
                ViewBag.Tab = tab;
    
                return PartialView(string.Format("~/Views/{0}/Index.cshtml", tab), viewModel);
            }
            catch (Exception e)
            {
                return View("ErrorChildAction");
            }
    
        }
    

    ErrorChildAction view

    @model System.Web.Mvc.HandleErrorInfo
    
    @{
        Layout = null;
    }
    
    <!DOCTYPE html>
    <html>
     <head>
      <title></title>
     </head>
     <body>
     <!-- Redirect to an error page in the application root -->
     <script type="text/javascript">
         window.location.href = '@Url.Content("~/400.htm")';
     </script>
    </body>
    

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that controls cameras. Currently I am adding support for HD
i have a site that uses globalize3 gem (https://github.com/svenfuchs/globalize3) and i'm currently adding the
Currently I have a loop that tries to find an unused filename by adding
I'm currently working on adding exceptions and exception handling to my OSS application. Exceptions
I am currently adding an action filter to handle session timeout in our site:
I currently am adding some features to our logging-library. One of these is the
I'm adding a toolbar to my application and currently I'm adding some toggle buttons
I am currently using Mono for Android to develop a mobile application. I have
I am currently working in iPhone application in which I have used wikitude api.
I am adding a WAR module [my-web-app] to an existing EAR application [my-ear-app] that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.