Loading ...

Login Page in ASP.NET

Vijendra Shakya likes this.
 

Comments (6)

Shaitender
Nice post !!!!!
3/10/2009
 · 
 
by
vivek_iit
Vivek Thakur said:
string commandText = "Select count(*) from user where userName='"+txtName.Text+"'and password ='"+txtPwd The above lines can lead to SQL Injection attacks, how can you avoid them?
3/10/2009
 · 
 
by
Vijjendra
I totally agree with you. To avoid SQL Injection you can pass the column Name instead of pass the textbox name after that add parameter. like: string commandText = "Select count(*) from dyve_user where userName=@UserName and password =@Password"; com.Parameters.AddWithValue("@UserName", txtName.Text); com.Parameters.AddWithValue("@Password", txtPwd.Text);
3/10/2009
 · 
 
by
rizwan
Thanks......... i have three types of users so what is the procedure to redirect them on 3 different pages
4/12/2009
 · 
 
by
nm
I have only one user so I dont want to use a database so how can i write a login page just using the if statement? what will the code be
4/27/2009
 · 
 
by
Vinay
gud buddy... Its very helpfull to all.
5/26/2009
 · 
 
by

Top posts

Vijendra Shakya's latest blog posts

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?