we are a small website company. I make the user interface of the website while my colleague develops the admin side in asp. The admin pages alow our client to change the text and images on certain pages like products, gallery etc. i want to study code examples of such admin pages so i can also learn to make them. can you tell me where i can find such admin code along with a simple explanation of the code working and logic? i hope my requirement is clear. please ask me to clarify if what i want is unclear. i can explain further with screenshots and our code if required.

Hi janicefernandes,

Admin code is not really anything "special," perse. Your admin site is probably going to be pretty specialized, at best. What you can search for is how to make the admin site protected so people who aren't supposed to access it can't. One method of achieving this is to have an admin login page that sets a Session variable, like 'admin_login', that can be used to identify whether or not a user should have access to a particular admin page.

Examples of logging in code can be found at http://www.asp101.com/samples/login.asp.

For the actual admin site, it's just a matter of writing HTML and ASP that accomplish changing the text and pictures in the gallery. You would need to have everything you want to be able to change to be in the database. Then simply pull a list of products or whatever out of the database and let the admin user click on one. Then list the fields and their values, and let the admin user change their values and click "Save," which should then run a query to update the table. Or even provide a form to add a new record that inserts into a table with a query.

Here are some example websites that talk about a database editing project:
http://www.4guysfromrolla.com/webtech/110999-1.shtml
http://www.2enetworx.com/dev/projects/tableeditor.asp
http://sourceforge.net/projects/ute-asp/

These projects probably have a single page that does all the work, taking QueryString parameters to identify the table that should be edited so that the code automatically determines field names and automatically builds forms and such. If you want the admin to be prettier or have specific features or fields disabled or such, you would want to build your own code, but you could use some of the scripts from the websites listed above perhaps as a starting point.

~ mellamokb

This article has been dead for over six months. Start a new discussion instead.