0

Hi All,

I am new to .Net. can anyone please tell me how to create loginpage in detail with steps and code.

Thanks,
Swapna

4
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by vmadhu_ece
0

u hould create table eiyh two columns and enter username and password in table using insert command.
then come to asp page
in page load 1. initialize the connection using the code sqlconnection con=new sqlconnection(); 2.open the connection con.open() 3. sqlcommand cmd=new sqlcommand("select *from tablename",con); 4. sqldatareader dr=cmd.executereader() 5. while(dr.read()) 6.

if ((TxtUsername.Text) ==re.GetString(0) && (TxtPassword.Text) == re.GetString(1))
{
    Response.Redirect("default.aspx");
}
else
{
    Response.write("invalid");
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.