Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Login.aspx
- private Rti.Admin.Login lg = new Rti.Admin.Login();
- protected void Page_Load(object sender, EventArgs e)
- {
- IsLogged();
- }
- protected void btnLogin_Click(object sender, EventArgs e)
- {
- lg.LoginCheck(tboxId.Text, tboxPwd.Text);
- IsLogged();
- }
- private void IsLogged() {
- if (lg.IsLogged())
- {
- if (Session["User"] == null)
- {
- Session["User"] = lg.Uid;
- }
- Response.Redirect("manager.aspx");
- }
- }
- //Manage.aspx
- private Rti.Admin.Login lg = new Rti.Admin.Login();
- private SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["Act2008"].ConnectionString);
- private SqlCommand cmd = new SqlCommand();
- protected void Page_Load(object sender, EventArgs e)
- {
- IsNotLogged();
- }
- private void IsNotLogged()
- {
- if (!lg.IsLogged())
- {
- Response.Redirect("index.aspx");
- }
- }
Add Comment
Please, Sign In to add comment