| | |
Help with ADMIN side of login ASP.NET
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
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 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# cac checkbox class commonfunctions compatible content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv formatdecimal formview gridview gudi iframe iis javascript listbox menu microsoft mouse mssql multistepregistration nameisnotdeclared news opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





