User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,583 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,610 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 981 | Replies: 3
Reply
Join Date: Oct 2007
Posts: 1
Reputation: kolony is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kolony kolony is offline Offline
Newbie Poster

Question login page

  #1  
Oct 30th, 2007
hi

i am new to asp.net .i have to do two projects in asp.net.
i am weak in coding . i am making a website in asp.net with vb.net as back-end .
i have to do codibg of login page which uses postback i am confused. i have seen daniweb's thread of login page but it is connected to db.pls help me.


is it possible that on amd processor we can't install visual studio 2005 ?
i have tried a lot but it is not woking .
there are any other options available other then vs 2005 for asp.net ?

reply as early as possible...
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 4
Reputation: johnpatrick is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
johnpatrick johnpatrick is offline Offline
Newbie Poster

Re: login page

  #2  
Oct 30th, 2007
Hey,

I have not heard about any issue specific to AMD Processor and VS 2005, may be good memory needed to load fast.
Anyway since you opted to check other alternative to Visual Studio, I can put my two cents on
a product called Web Matrix - check it out,.

www.asp.net/webmatrix/default.aspx

John
Reply With Quote  
Join Date: Oct 2007
Posts: 4
Reputation: johnpatrick is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
johnpatrick johnpatrick is offline Offline
Newbie Poster

Re: login page

  #3  
Oct 30th, 2007
You need to focus on Web.Config Authentication mode, (Windows - for Intranet or Forms - Database driven user name password)

Check Web.config and connectionstring to set your database.

Use an ASPX page to check for the UserId and PAssword.

If you use SQL Server use SQLClient namespace and related classes.

if Access - OLEDB should be good.

Be Specific with your question, so that some one can help you better.

cheers
john
Reply With Quote  
Join Date: Sep 2007
Posts: 1,058
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: login page

  #4  
Oct 30th, 2007
If you are using asp.net version 2.0, you can use membership which will be faster. I like the traditional way of doing it myself, but that's me.

You would need to build a database with the minimum columns of username, userid, and password.

Then, when you set up your connection to your database (whether it be OLDEB for MS Access, SQLClient for MS SQL, or ODBC for MySQL), you will need a form that asks for the username and password. You can then check the database for the username, compare the passwords, and either authorize access or post an error. A way of doing this that is not complex would be this here:
Dim strUser As String = txtUserName.Text
'If you are not running a form at the server (meaning <form runat="server">)
'use the commented code for requesting form variables.
'Dim strUser As String = Request.Form("txtUserName")
Dim strPass As String = txtPassword.Text
'Dim strPass As String = Request.Form("txtPassword")
Dim strDatabasePassword As String
Dim conLogin = New OdbcConnection( connection string or reference to web.config where connection string is )
Dim cmdSelect = New OdbcCommand( "SELECT Password FROM Users WHERE UserName=@User", conLogin )
cmdSelect.Parameters.AddWithValue( "@User", strUser )
conLogin.Open()
strDatabasePassword = cmdSelect.ExecuteScalar()
conLogin.Close()
if (String.Compare(strPass, strDatabasePassword, False)) = 0 then
'False means that you are comparing case-sensitive. True means case-insensitive
'do user stuff here as zero means it passed validation
else
'do bad stuff here as anything BUT zero means it failed validation
end if 
The above example just pulls the information from the two fields in your form labeled txtUserName and txtPassword. It then searches the database for a username equal to txtUserName. Then it compares the password given by the form with the password in the database (case-sensitive!!). If it is correct then do whatever you need to, if not, you should post an error.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC