Error.cshtml 1003 B

123456789101112131415161718192021222324252627282930313233343536
  1. @model System.Web.Mvc.HandleErrorInfo
  2. @{
  3. ViewBag.Title = "错误";
  4. }
  5. @functions{
  6. Exception GetExceptionDetailMessage(Exception ex)
  7. {
  8. if (ex.InnerException == null)
  9. return ex;
  10. else
  11. return GetExceptionDetailMessage(ex.InnerException);
  12. }
  13. }
  14. <script type="text/javascript">
  15. function encodeURL(s) {
  16. return s.replace(/&amp;/g, "&");
  17. }
  18. $(function () {
  19. $.messager.alert('系统提示', '@GetExceptionDetailMessage(Model.Exception).Message', 'info', function () {
  20. var lastUrl = '@ViewBag.url';
  21. var windowID = $.SystemGeneral.getUrlParam("WindowID");
  22. if (lastUrl == '') {
  23. if (windowID && window != "") {
  24. top.$('#' + windowID).window('close');
  25. } else {
  26. location.reload(false);
  27. }
  28. } else {
  29. location.href = encodeURL('@ViewBag.url');
  30. }
  31. });
  32. })
  33. </script>