Example #1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         b.UserName      = TextBox1.Text.Trim();
         b.Password      = TextBox2.Text.Trim();
         s               = b.LG_Call();
         Session["E_Id"] = s;
         string str = Convert.ToString(Session["E_Id"]);
     }
     catch (NullReferenceException ex)
     {
         Response.Write(ex.Message);
     }
     catch (Exception ex)
     {
         Response.Write(ex.Message);
     }
     if (s != null)
     {
         t = s.Split('*');
         FormsAuthentication.RedirectFromLoginPage(s, false);
         if (t[1] == "qm")
         {
             Response.Redirect("CusMgr/Cus_Qry_Mgr.aspx");
         }
         else
         {
             Response.Redirect("CusCare/CCHome.aspx");
         }
     }
     else
     {
         Label4.Text = "Invalid User";
     }
 }