--------------------------------------------------------------------------------------------------
Design a login control using lebel,texbox and botton.
then write code in button Event
if(Membership.ValidateUser(txtUserName.Text.ToString(), txtPassword.Text.ToString()))
{
FormsAuthentication.SetAuthCookie(txtUserName.Text, remember.Checked );
Response.Redirect("~/Default.aspx");
}
else{
ErrorMgs.Text = "Invalid User Id or password";
}
No comments:
Post a Comment