943,967 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 1343
  • ASP.NET RSS
Aug 20th, 2007
0

help me pls.. tml 10 more hours to due date..!!

Expand Post »
can anyone show me to login page code?? i did my registration code already.. now i need the login page the userid and pword read from my database access then the user can log in to another page.. i need the whole code. as simple as possible.. thankyou very much. this is my asp.net assignment.. im very weak in asp.net.. pls help.. tq.. im doing dvd rental assignment..

im using asp.net 1.1 and microsoft access 2003
Last edited by gminghon; Aug 20th, 2007 at 12:58 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gminghon is offline Offline
4 posts
since Aug 2007
Aug 20th, 2007
0

Re: help me pls.. tml 10 more hours to due date..!!

Use this code
<script runat="server">
void button_click(Object s, EventArgs e)
{
if (ds_user.RecordCount == 1)
{
Response.Cookies["ckuser"].Value = txtusername.Text;
Response.Cookies["ckuser"].Expires = DateTime.Now.AddDays(1);
Response.Redirect("home.aspx");
}
}
</script>

You can fill the Dataset "ds_user" with this valid user check result. This will have 1 record if the username and password matches
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Aug 20th, 2007
0

Re: help me pls.. tml 10 more hours to due date..!!

Query to validate the user name and password is:

SELECT user_id, user_name, user_pwd
FROM tbl_users
WHERE user_name = @user_name AND user_pwd = @userpwd

You can also use the windows authentication by using (AuthenticatioMode = Windows) in app.config file
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Aug 20th, 2007
0

Re: help me pls.. tml 10 more hours to due date..!!

omg... i dun understand.. but wat i wan is the userid and pword textbox is read from my microsoft access database..let say my database name user_details.mdb
if userid and pword match wif access database redirect to home.aspx if not match error.. wait should i do?? i really dunno how to code this login page... can teach me step by step? or create the login page for me??
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gminghon is offline Offline
4 posts
since Aug 2007
Aug 20th, 2007
0

Re: help me pls.. tml 10 more hours to due date..!!

It does not matter what Database your are using. Even if you are using the logic will remain the same. But the only thing that would change is the Database connection string. You can use OLE_DB to connect to the Access Database and then do the rest of the task.

Connection string would be something like this for Access:
Dim strConn as string = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath "user_details.mdb") & ";"
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Aug 20th, 2007
0

Re: help me pls.. tml 10 more hours to due date..!!

so the code should be

urm the top should
import.xxxx
<script runat="server">
Dim strConn as string = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath "user_details.mdb") & ";"

void button_click(Object s, EventArgs e)
{
if (ds_user.RecordCount == 1)
{
Response.Cookies["ckuser"].Value = txtusername.Text;
Response.Cookies["ckuser"].Expires = DateTime.Now.AddDays(1);
Response.Redirect("home.aspx");
}
}
</script>

like this???
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gminghon is offline Offline
4 posts
since Aug 2007
Aug 20th, 2007
0

Re: help me pls.. tml 10 more hours to due date..!!

yes and then you need to open the Dataset also when the users clicks on submit. ie; "ds_user"
For web applications it is recommended to use Data Readers instead of Data Sets.
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Aug 20th, 2007
0

Re: help me pls.. tml 10 more hours to due date..!!

binoj_daniel do u have msn?? or email?? can u help me create my login page.. i wil send u my project to u.. or i can ask you question thru msn.. coz my pc is slow.. can't open too many application...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gminghon is offline Offline
4 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: synchronization, remoting, ad rotator
Next Thread in ASP.NET Forum Timeline: asp.net with MYSQL





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC