summaryrefslogtreecommitdiffstats
path: root/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-04-19 07:09:32 -0400
committerAndrew Arnott <andrewarnott@gmail.com>2010-04-19 07:09:32 -0400
commit668c50fd19dc633bd367ac8ace37df8b5f9a5881 (patch)
tree8ab71b553fa22e12aae6817b3c6fab93acdd31df /samples/OAuthConsumer/SignInWithTwitter.aspx.cs
parentfef932af78eac2b775452c4a851e84a813027548 (diff)
downloadDotNetOpenAuth-668c50fd19dc633bd367ac8ace37df8b5f9a5881.zip
DotNetOpenAuth-668c50fd19dc633bd367ac8ace37df8b5f9a5881.tar.gz
DotNetOpenAuth-668c50fd19dc633bd367ac8ace37df8b5f9a5881.tar.bz2
Updated OAuth C and SP samples to use standard WAP namespaces.
Diffstat (limited to 'samples/OAuthConsumer/SignInWithTwitter.aspx.cs')
-rw-r--r--samples/OAuthConsumer/SignInWithTwitter.aspx.cs58
1 files changed, 30 insertions, 28 deletions
diff --git a/samples/OAuthConsumer/SignInWithTwitter.aspx.cs b/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
index 688471a..9cea1f5 100644
--- a/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
+++ b/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
@@ -1,37 +1,39 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Linq;
-using System.Web;
-using System.Web.Security;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using System.Xml.Linq;
-using System.Xml.XPath;
-using DotNetOpenAuth.ApplicationBlock;
-using DotNetOpenAuth.OAuth;
+namespace OAuthConsumer {
+ using System;
+ using System.Collections.Generic;
+ using System.Configuration;
+ using System.Linq;
+ using System.Web;
+ using System.Web.Security;
+ using System.Web.UI;
+ using System.Web.UI.WebControls;
+ using System.Xml.Linq;
+ using System.Xml.XPath;
+ using DotNetOpenAuth.ApplicationBlock;
+ using DotNetOpenAuth.OAuth;
-public partial class SignInWithTwitter : System.Web.UI.Page {
- protected void Page_Load(object sender, EventArgs e) {
- if (TwitterConsumer.IsTwitterConsumerConfigured) {
- MultiView1.ActiveViewIndex = 1;
+ public partial class SignInWithTwitter : System.Web.UI.Page {
+ protected void Page_Load(object sender, EventArgs e) {
+ if (TwitterConsumer.IsTwitterConsumerConfigured) {
+ MultiView1.ActiveViewIndex = 1;
- if (!IsPostBack) {
- string screenName;
- int userId;
- if (TwitterConsumer.TryFinishSignInWithTwitter(out screenName, out userId)) {
- loggedInPanel.Visible = true;
- loggedInName.Text = screenName;
+ if (!IsPostBack) {
+ string screenName;
+ int userId;
+ if (TwitterConsumer.TryFinishSignInWithTwitter(out screenName, out userId)) {
+ loggedInPanel.Visible = true;
+ loggedInName.Text = screenName;
- // In a real app, the Twitter username would likely be used
- // to log the user into the application.
- ////FormsAuthentication.RedirectFromLoginPage(screenName, false);
+ // In a real app, the Twitter username would likely be used
+ // to log the user into the application.
+ ////FormsAuthentication.RedirectFromLoginPage(screenName, false);
+ }
}
}
}
- }
- protected void signInButton_Click(object sender, ImageClickEventArgs e) {
- TwitterConsumer.StartSignInWithTwitter(forceLoginCheckbox.Checked).Send();
+ protected void signInButton_Click(object sender, ImageClickEventArgs e) {
+ TwitterConsumer.StartSignInWithTwitter(forceLoginCheckbox.Checked).Send();
+ }
}
} \ No newline at end of file