![]() |
| ||
| Help with ADMIN side of login ASP.NET 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. |
| ||
| Re: Help with ADMIN side of login ASP.NET 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: Quote:
|
| All times are GMT -4. The time now is 7:26 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC