954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

simple ASP.Net Loginpage with SQL server

Hi All,

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

Thanks,
Swapna

eswapna
Newbie Poster
1 post since Jan 2007
Reputation Points: 10
Solved Threads: 0
 
sedgey
Junior Poster
131 posts since Jan 2007
Reputation Points: 68
Solved Threads: 9
 

Hi..Please try to following link...


This link is step by step login creation....

http://www.asp.net/learn/security/?lang=cs


Thanks,

kaptham
Newbie Poster
6 posts since Apr 2008
Reputation Points: 10
Solved Threads: 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");
}
vmadhu_ece
Newbie Poster
4 posts since May 2008
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You