using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class home : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { int id = int.Parse(TextBox1.Text); string pwd = TextBox2.Text; logic log = new logic(); if (log.login_valid(id,pwd) == true) { Session["managerid"] = id; Response.Redirect("~/manager_homepage.aspx", true); } else { lblmsg.Text = "Login unsuccesful"; } } protected void Button2_Click(object sender, EventArgs e) { int id = int.Parse(TextBox3.Text); string pwd = TextBox4.Text; logic log = new logic(); if (log.user_login_valid(id, pwd) == true) { //lblmsg.Text = "Registration successful"; //Response.Write("Registration successful"); Session["userid"] = id; Response.Redirect("~/user_homepage.aspx", true); } else { lblmsg1.Text = "Login unsuccesful"; } } }