summaryrefslogtreecommitdiffstats
path: root/samples/Consumer/SampleWcf.aspx.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-10-05 08:17:04 -0700
committerAndrew <andrewarnott@gmail.com>2008-10-05 08:17:04 -0700
commite05932831b940199cba4edab68d383dcfdedfd9c (patch)
tree2a6084399b4234dd7da239c4d0d8f5c78fb50b31 /samples/Consumer/SampleWcf.aspx.cs
parent3278e2098c375383ca9a1dd06f7340bd69cc1e60 (diff)
downloadDotNetOpenAuth-e05932831b940199cba4edab68d383dcfdedfd9c.zip
DotNetOpenAuth-e05932831b940199cba4edab68d383dcfdedfd9c.tar.gz
DotNetOpenAuth-e05932831b940199cba4edab68d383dcfdedfd9c.tar.bz2
Slightly improved UI on WCF Consumer sample.
Diffstat (limited to 'samples/Consumer/SampleWcf.aspx.cs')
-rw-r--r--samples/Consumer/SampleWcf.aspx.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/samples/Consumer/SampleWcf.aspx.cs b/samples/Consumer/SampleWcf.aspx.cs
index a6cdc8f..1e03669 100644
--- a/samples/Consumer/SampleWcf.aspx.cs
+++ b/samples/Consumer/SampleWcf.aspx.cs
@@ -1,4 +1,5 @@
using System;
+using System.Globalization;
using System.Net;
using System.ServiceModel;
using System.ServiceModel.Channels;
@@ -18,6 +19,7 @@ public partial class SampleWcf : System.Web.UI.Page {
var accessTokenMessage = consumer.ProcessUserAuthorization();
if (accessTokenMessage != null) {
Session["WcfAccessToken"] = accessTokenMessage.AccessToken;
+ authorizationLabel.Text = "Authorized! Access token: " + accessTokenMessage.AccessToken;
}
}
}
@@ -29,13 +31,12 @@ public partial class SampleWcf : System.Web.UI.Page {
}
protected void getNameButton_Click(object sender, EventArgs e) {
- string name = CallService(client => client.GetName());
- Response.Write(name);
+ nameLabel.Text = CallService(client => client.GetName());
}
protected void getAgeButton_Click(object sender, EventArgs e) {
int age = CallService(client => client.GetAge());
- Response.Write(age);
+ ageLabel.Text = age.ToString(CultureInfo.CurrentCulture);
}
private T CallService<T>(Func<DataApiClient, T> predicate) {