protected void LoginProcess(byte CalledFrom) { if (CalledFrom == 1) { Name = Name; Password = Password; } else if (CalledFrom == 2) { Name = Convert.ToString(txtemail.Text.Trim()); Password = Convert.ToString(txtpassword.Text.Trim()); } Objadminlogin.ValidateAdminLogin(Name, Password, ref admin_id, ref Email, ref Level_Id); if (admin_id != 0 && Level_Id != 1) { //App_Param.AdminAppParam(admin_id, Name, Email, 2); //int Admin_ID, string Admin_Name, string Admin_Email, int CalledFrom // App_Param.AdminInitUSer(admin_id, Name, Email, 2); Session["login"] = LoginAdmin.adlogin(Name, Password, admin_id, Email, Level_Id); if (CalledFrom == 2) { //if (chk_Remember.Checked == true) SaveLoginDatatoCookie(); // 'Save Login Values into Cookie //SaveLoginHistory(admin_ID); } Response.Redirect(SiteCommon.UserDefaultURL); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Username or password Incorrect');", true); } }