| | |
Help with ADMIN side of login ASP.NET
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2005
Posts: 1
Reputation:
Solved Threads: 0
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.
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.
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:
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.
![]() |
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Using Hidden Variables in ASP.NET (ASP.NET)
- variables from javascript in asp.net (ASP.NET)
- ASP in ASP.NET application (ASP.NET)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Ready to take up a challenge
- Next Thread: Error while declaring Crystal Report Object
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv gridview gudi iis javascript list listbox login menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers





