Hi All,

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

Thanks,
Swapna

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");
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.