summaryrefslogtreecommitdiffstats
path: root/samples/InfoCardRelyingParty/TracePage.aspx.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-03-25 21:23:10 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-03-25 21:23:10 -0700
commitbb640606668f704aacfb5d45da4cacd947c20639 (patch)
tree3ba18d7d58ae444d11cece0dc764f62d3036d957 /samples/InfoCardRelyingParty/TracePage.aspx.cs
parent29d36ae88cbbb6b1d2566593fcf49022dc4407f6 (diff)
downloadDotNetOpenAuth-bb640606668f704aacfb5d45da4cacd947c20639.zip
DotNetOpenAuth-bb640606668f704aacfb5d45da4cacd947c20639.tar.gz
DotNetOpenAuth-bb640606668f704aacfb5d45da4cacd947c20639.tar.bz2
Better logging in samples.
Diffstat (limited to 'samples/InfoCardRelyingParty/TracePage.aspx.cs')
-rw-r--r--samples/InfoCardRelyingParty/TracePage.aspx.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/samples/InfoCardRelyingParty/TracePage.aspx.cs b/samples/InfoCardRelyingParty/TracePage.aspx.cs
new file mode 100644
index 0000000..7075ce3
--- /dev/null
+++ b/samples/InfoCardRelyingParty/TracePage.aspx.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+/// <summary>
+/// A page to display recent log messages.
+/// </summary>
+public partial class TracePage : System.Web.UI.Page {
+ protected void Page_Load(object sender, EventArgs e) {
+ this.placeHolder1.Controls.Add(new Label { Text = HttpUtility.HtmlEncode(Logging.LogMessages.ToString()) });
+ }
+
+ protected void clearLogButton_Click(object sender, EventArgs e) {
+ Logging.LogMessages.Length = 0;
+
+ // clear the page immediately, and allow for F5 without a Postback warning.
+ Response.Redirect(Request.Url.AbsoluteUri);
+ }
+}