There are different ways. You can use form authentication , it's a way to do that. <system.web> <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" timeout="30" name=".ASPXAUTH" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" /> </authentication> <authorization> <allow users="admin" /> <deny users="*" /> </authorization> </system.web> private void btnLogin_Click(object sender, System.EventArgs e) { if (Validate(txtUsername.Text, txtPassword.Text)) { FormsAuthentication.Initialize(); String strRole = txtUsername.Text; FormsAuthenticationTicket fat = new For...
A Guide to make you Prepare for Placements, Aptitude Tests, Interviews, projects...