Loading ...

Login Page in ASP.NET

Who is online?  0 guests and 0 members
home  »  blogs  »  Vijendra Shakya  »  Create Login Page in ASP.NET

Product Spotlight

ASP.NET Hosting Spotlight

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

Confirm

Latest community blog posts

  • A person on the forums was struggling with jQuery tools tabs index issue on postback. On clicking the tabs and doing some postback the selected tab index was getting lost. Below is the solution on how to retaing the previous selected index which was there before postback. Complete Source: <%@ Pag...
  • I was working with jQuery tools tabs today and I had to set the initial index of tab selected by default. The solution is to set initialindex property in the options. Source: $("ul.tabs").tabs("div.panes > div", { initialIndex: 1 }) ; Complete code to test above: <html> <head> <tit...
  • A person asked me today how to get form authentication cookie and get the data present in it. I decided to write a short blog on it. Formauthentication cookie is saved with the name which we can get via FormsAuthentication.FormsCookieName property. The key here is to get the cookie via this name and...
  • While working with one of the sample application I noticed that form authentication timeout in web.config was overriding the manual ticket's (which we created via code) timeout. Below is the code which was written in the application: var ticket = new FormsAuthenticationTicket(1, "UserName", DateTime...
  • In this blog I will show how to select a range of characters in textbox with jquery. In my demo I have used one textbox and one button. On click of button arange of characters in textbox will be selected. Below is the sample code: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="ser...

Vijendra Shakya's latest blog posts

Product Spotlight

ASP.NET Hosting Spotlight

 

Quick Vote

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