Last active
January 4, 2016 20:39
-
-
Save thoolihan/8675592 to your computer and use it in GitHub Desktop.
#ASPNET Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class AdminHomePage : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
if (IsPostBack) //note removal of ! | |
{ | |
try | |
{ | |
Login sourcePage = Context.PreviousHandler as Login; | |
Label1.Text = sourcePage.Property1; | |
} catch(Exception ex) { | |
Lable1.Text = "Redirected from a page that wasn't Login"; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in response to http://paste.ubuntu.com/6834025/