<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ErrorPage.aspx.cs" Inherits="ErrorPage" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Error Page</title> <link rel="stylesheet" href="<%=Page.ResolveUrl("~/")%>css/default.css" type="text/css" /> <script src="<%=Page.ResolveUrl("~/")%>js/jquery-3.6.0.min.js" type="text/javascript"></script> <style type="text/css"> body { margin: 0; padding: 0; border: 0; font-family: Verdana; font-size: 12px; } a { text-decoration: none; color: #2140fb; } a:hover { text-decoration: underline; } a:visited { color: #2140fb; } #host_header { background: #F78E1E; color: #000; height: 60px; /*box-shadow: 0 0 10px rgba(0,0,0,.4);*/ } #host_header .logo { float: left; height: 55px; } .error_prompt { font-family: Arial; font-size: 1.4em; margin: 48px 30px; } .error_prompt a { font-weight: bold; } .error_detail { margin: 48px 30px; } .error_detail .error_label { color: #0094ff; cursor: pointer; } .error_detail .error_label:hover { text-decoration: underline; } .error_detail_div { background: #ffe880; font-size: 11px; font-family: Consolas, 'Lucida Console', 'Courier New', monospace; padding: 10px; margin-top: 10px; } </style> <script type="text/javascript"> var code ="<%=Code %>"; $(function () { if (code == "403") $("#error_noright").show(); else $("#error_content").show(); $('#error_label').click(function () { var _div = $('#<%=error_detail.ClientID%>'); if (_div.css('display') == 'none') { _div.css('display', ''); } else { _div.css('display', 'none'); } }); }); </script> </head> <body> <div id="host_main"> <div id="host_header"> <img src="<%=Page.ResolveUrl("~/")%>titlelogo.ashx" class="logo" style="margin-left: 10px; margin-top: 2px; margin-bottom: 2px;" /> </div> </div> <div id="content"> <div id="error_content" style="display: none;"> <div class="error_prompt"> Error occurs, please refresh the page later.<br /> <br /> Or return to the <a href="<%=LoginPageUrl %>">Login page.</a> </div> <div class="error_detail" style="display: none"> <label class="error_label" id="error_label">Show Detail</label><div id="error_detail" class="error_detail_div" runat="server" style="display: none;">Error occurs.</div> </div> </div> <div id="error_noright" style="display: none; margin-left: 20px; margin-top: 20px;"> <div>You have no right to access this page.</div> <br /> <div>Click <a href="<%=LoginPageUrl %>">here</a> to redirect to the login page.</div> </div> </div> </body> </html>