Repository navigation
Expand file tree
/
Copy pathError.aspx
More file actions
100 lines (91 loc) · 4.16 KB
/
Copy pathError.aspx
File metadata and controls
100 lines (91 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="Exceptionless" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void SendButton_Click(object sender, EventArgs e) {
string errorId = ExceptionlessClient.Default.GetLastReferenceId();
string emailAddress = EmailAddressTextBox.Text;
string description = DetailTextBox.Text;
bool success = ExceptionlessClient.Default.UpdateUserEmailAndDescription(errorId, emailAddress, description);
if (!success) {
GenericPanel.Visible = true;
AddDetailPanel.Visible = false;
DetailSubmitedPanel.Visible = false;
} else {
GenericPanel.Visible = false;
AddDetailPanel.Visible = false;
DetailSubmitedPanel.Visible = true;
}
}
protected void Page_Load(object sender, EventArgs e) {
if (!IsPostBack) {
if (String.IsNullOrEmpty(ExceptionlessClient.Default.GetLastReferenceId())) {
GenericPanel.Visible = true;
AddDetailPanel.Visible = false;
DetailSubmitedPanel.Visible = false;
}
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Error</title>
<style type="text/css">
body {
background-color: #FFF;
font-family: verdana, arial, helvetica, sans-serif;
text-align: center;
}
#content {
margin-left: auto;
margin-right: auto;
margin-top: 60px;
text-align: left;
width: 800px;
}
#content h2 { color: red; }
.lable { margin: 1px; }
.input { margin-bottom: 8px; }
</style>
</head>
<body>
<form id="errorForm" runat="server">
<div id="content">
<asp:Panel ID="GenericPanel" runat="server" Visible="false">
<h2>
We are currently unable to serve your request</h2>
<p>
We apologize, but an error occurred and your request could not be completed.</p>
</asp:Panel>
<asp:Panel ID="AddDetailPanel" runat="server">
<h2>
We are currently unable to serve your request</h2>
<p>
We apologize, but an error occurred and your request could not be completed.</p>
<p>
This error has been logged. To help us diagnose the cause of this error and improve the software, please enter your email address, describe what you were doing when this error occurred, and send this report to us.</p>
<div class="label">
<asp:Label runat="server" Text="Your email address (optional):" ID="EmailAddressLabel" AssociatedControlID="EmailAddressTextBox" />
</div>
<div class="input">
<asp:TextBox runat="server" ID="EmailAddressTextBox" Columns="50"></asp:TextBox>
</div>
<div class="label">
<asp:Label runat="server" Text="Describe what you were doing when the error occurred (optional):" ID="DetailLabel" AssociatedControlID="DetailTextBox" />
</div>
<div class="input">
<asp:TextBox runat="server" ID="DetailTextBox" TextMode="MultiLine" Rows="10" Columns="60"></asp:TextBox>
</div>
<div>
<asp:Button runat="server" Text="Send" ID="SendButton" OnClick="SendButton_Click" />
</div>
</asp:Panel>
<asp:Panel ID="DetailSubmitedPanel" runat="server" Visible="false">
<p>
Thank You. Your details have been submitted.</p>
</asp:Panel>
</div>
</form>
</body>
</html>