.Net provides validation controls itself. YOu can opt from requiredfieldvalidator ( eg, to make sure user cant leave something blank, like mayb username ) or comparefieldvalidator ( to make sure two entered passwords are same) , regularexpressionvalidator ( mayb to check if email or phone is in correct format ). And implementaion of these controls is very easy.
u can try this code protected void lklogout_Click(object sender, EventArgs e) { FormsAuthentication.SignOut(); HttpContext.Current.Session.Clear(); HttpContext.Current.Session.Abandon(); Response.Redirect("~/adminlogin.aspx"); } below code paste in web config <authentication mode="Forms"> <forms loginUrl="default.aspx" protection="All" path="/"/> </authentication>