protected void btnLogin_Click(object sender, EventArgs e)
{
if (Page.IsValid)
if (txtUser.Text == "ram")
{
if (txtPassword.Text == "12")
{
Session["User"] = "ram";
Response.Redirect("~/Default.aspx");
}
else
{
Response.Write("Invalid Password");
txtPassword.Text = string.Empty;
txtPassword.Focus();
}
}
else
{
Response.Write("Invalid User Name");
txtUser.Text = string.Empty;
txtUser.Focus();
}
}
here for login i have manually filled the datas in the textboxes for comparing??
how can i use the database for the login authentication with session in the login page?? instead of assiging value here how can i access the values from database??