![]() |
How to create a login page?
hi,
i want to do a login page. i`m using C#, ASP.net and Midrosoft SQL. i also am using Visual Studio 2005 which has the login control included. the question is.. how do i do that? i created a database named "Testing" and the tables inside are "Name" with "UserId" and "Password" columns.. can anyone guide me from creating the database to the launching steps? i read a few toturials but they are for the sql + asp literate ppl. i`m not that good in both. just learning.. Code:
string strConnection = "data source=localhost;database=SQL2K5;uid=sa;pwd=;";is there anyway not to reveal that in source code? |
Re: How to create a login page?
This is what I Use , you can change the ado connection code to be sql fairly easily without changing anythin else.
Code:
conn.open = "Provider=SQLOLEDB.1;User ID=sa;password=mypassword;Initial Catalog=MyDatabase;Data Source = MySQLServer;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"Code:
<%Code:
if len(session("username"))< 1 then |
Re: How to create a login page?
erm.. i still dont get it..
what i understand is.. 1. create a database with user login information 2. create login.aspx and default.aspx 3. in the login.aspx, put login control. this is where i am blurred. i dont know the code to connect from this page to SQL, to pull the data.. i want to see how the code will be in login.aspx.cs Code:
using System; |
Re: How to create a login page?
I am not sure but I think Simple Login in ASP using MS Access database should help to some extent.
|
Re: How to create a login page?
you also might want to change the form method from GET ip POST if using it on a live system.
|
Re: How to create a login page?
Make a try with this code
Code:
String strSQL = "Select Count(*) From Authenticate where UserId =+”’John’” + and Password =+”’Password’”;";Regards, Venkatesan Prabu. J |
| All times are GMT +5.5. The time now is 01:06. |