Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Page1 :System.Web.UI.Page
- {
- public static LGDP.LDGPSession var1 = null;
- private void Login(this, EventArgs e)
- {
- var1 = new LGDPSession(this, data, data);
- }
- public bool IsLoggedIn()
- {
- bool login = false;
- if (var1 != null)
- {
- login = true;
- }
- return var1;
- }
- }
- public partial class Page2 :System.Web.UI.Page
- {
- Page1.(nothing shows up here)
- }
- private static bool _login = false;
- public static void SetLoggedIn(object lgdps)
- {
- if (lgdps == null)
- {
- _login = false;
- }
- if (lgdps != null)
- {
- _login = true;
- }
- }
- public static bool IsLogin
- {
- get { return _login; }
- }
- public class BasePage : Page
- {
- public bool IsLoggedIn()
- {
- bool login = false;
- if (var1 != null)
- {
- login = true;
- }
- }
- }
- public partial class Page1 : BasePage
- {
- }
- public partial class Page2 : BasePage
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if(IsLoggedIn())
- {
- }
- }
- }
- public bool IsLoggedIn()
- {
- bool login = false;
- if (var1 != null)
- {
- login = true;
- }
- return login;
- }
- public bool IsLoggedIn()
- {
- return var1 != null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement