Help with ADMIN side of login ASP.NET

Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Jun 2005
Posts: 1
Reputation: laynie21 is an unknown quantity at this point 
Solved Threads: 0
laynie21 laynie21 is offline Offline
Newbie Poster

Help with ADMIN side of login ASP.NET

 
0
  #1
Jun 6th, 2005
Hello,

I need help. I have a login page that works fine. I did not use a web config file though. I just had the users login to my access database and that signs them in ok.

My question is how do I setup an Admin side so that only the admin has access to updating the database from the website? I also want the user to be able to update their profile. I used a datagrid to show the users information but when I click update everybody in the databases info is shown.

Let me know if you need to see my code.

I am very new to ASP.net if you can not already tell lol.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 26
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: Help with ADMIN side of login ASP.NET

 
0
  #2
Jun 6th, 2005
Ok,

To start, the web.config route of doing a login page, is not a requirement, so you page SHOULD work fine, as you said it is. It is important that you understand the use of the web.config file; a different means to the same end. But that is another discussion.

You can setup the datagrid to display only the data related to that user. That is a simple change in the SQL/query code; add the WHERE clause.

example: SELECT UserName, Password, FirstName, LastName, DOB, Address, Security Level FROM tblUsers WHERE UserName = txtUserName

This is equally true for the admin side as well. WHERE clauses can help you to filter what you application displays and WHERE clauses in the code behind would be If/Then, cases, or some other forms of logic structures.

sample (pseudo-code):

If username = "admin" then
response.redirect ("somepage.aspx")
else
response.redirect ("Default.aspx")
end if


My recommendation is this; sit down and decide the logic of your application, as this will save you headaches, and time.

Hope this helps.
:cooL:

Originally Posted by laynie21
Hello,

I need help. I have a login page that works fine. I did not use a web config file though. I just had the users login to my access database and that signs them in ok.

My question is how do I setup an Admin side so that only the admin has access to updating the database from the website? I also want the user to be able to update their profile. I used a datagrid to show the users information but when I click update everybody in the databases info is shown.

Let me know if you need to see my code.

I am very new to ASP.net if you can not already tell lol.
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC