title: How to pass value from partial view to shared view _Layout.cshtml in asp.net MVC?
body: <p>There is a controller which catches an exception. I would like to pass the error message to a generic javascript in _Layout.cshtml so as to apply to all pages. It is totally find if the value is passed from normal view to _Layout.cshtml by, e.g. @ViewBag = "error message"; in the view or ViewBag.ErrorMessage = "error message"; in the controller, but it is not working in partial view.</p>
  
  <p>What should I do in order to pass the string message from partial view to _Layout.cshtml??</p>