views:

50

answers:

4

I've learned asp.net from books available on the internet, but I didn't find a good book that teaches you some techniques or logic to follow to build an administration area to control the front-end. I mean they talked about security, membership and roles. but still they didn't show you how to manage anything that's not related to a database, anything that's related to a database you'll probably create a page to display some info from a db with some SELECT commands and another page for the admin to INSERT, DELETE, UPDATE

but how can I connect to the other controls from my admin panel.

for example : a textbox in the admin.aspx will edit the value of a certain label in display.aspx

another example : I built a web user control to retrieve articles from a DB and another control to be placed in the admin page, which will let the admin add new articles and it will insert it to the database, how can I add more power to the admin page to control the number articles to display on the page, or to control the sorting of the articles, etc...

If i could get a name of a book that helps me with the logic or basics of creating a page that works like my admin panel to control the front-end it would be great, if not! some ideas or articles would help

Thanks for your time and help in advance =)

A: 

What you are describing sounds like a content management system. You can certainly build your own, but there are some already available such as .NET Nuke.

e36M3
true!..but am trying to build it from scratch for practice, experience and of course flexibility so, you there are any books or articles that could help me with the administration concept
lKashef
+1  A: 

You need to insert Controls into your admin area, where you can enter the desired values. E.g.

<asp:TextBox ID="txtPageSize" runat="server" />

Afterwards you somehow need to store them, e.g. in a database.

// plenty of ways to do so

In the client page you can then retrieve that value from the database and assign it to the corresponding control. E.g. with a GridView

this.GridView1.PageSize = // insert code to retrieve the value you just saved before in the admin arae

Edit: You probably need to learn more about the asp.net lifecycle. Finding controls of the current page and the masterpage works, but from another page does not work, because it is only created upon execution. You won't be able to change these values in the admin area, because these values need to be stored permanently, so that everyone will be able to see the pages with the settings you desired indenpendently of the time they call the page.
There is a "built-in" way by storing the Settings in the so called Application Cache http://msdn.microsoft.com/en-us/library/ms178597.aspx, but this cache only persists as long as the application is running (e.g. in the IIS). Once the application resets, are your changes are lost and you would need to make them again. What is why it is so important to have a persistent way of storing such settings, unless you like to babysit your application everytime it restarts (e.g. server restart in the middle of the night)

citronas
I'm okay with that, but I thought there could be another way using Methods and Properties provided in the framework instead of depending on the database with every detailfor example: the FindControls method, it works with the Master property and with the same page but i couldn't get it to work finding controls from a whole different page
lKashef
I edited my post to clarify myself
citronas
+1  A: 

There's no magic to it. Admin updates tables in database. default.aspx page reads those values from the database. Good example here

Bryce Fischer
A: 

Here are a few books/links you might find helpful. They are not explicitly administration interface related, but they all contain portions that directly address the issues you are asking about:

  1. http://www.amazon.com/Developing-User-Interfaces-Microsoft-Windows/dp/0735605866
  2. http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_4_-_Creating_an_Administrator_Interface (MVC Specific, but administration control concepts are the same)
  3. http://www.amazon.com/About-Face-Essentials-Interface-Design/dp/1568843224
  4. http://www.useit.com/books/uibooks.html
  5. http://www.smashingmagazine.com/2008/01/24/usability-and-interface-design-books/
Joel Etherton