Mostly Static, but Some Dynamicness .. Recommendations:

S

sloan

I have a web site. 90% of it is static.

Lets say I have a menu system

Home
VicePresidents
ContactUs

Home is static
ContactUs is static

VicePresidentsHome.aspx is static

However, lets say I have 4 or 5 (on N) number of VicePresidents.

and I'd like to make a page for each of the VP's.

Sometimes VP's are hired. Sometimes they are fired. (Aka, sometimes I need
to delete a VP page, add a new VP page)

On the menu
Home
VicePresidents
ContactUs

if I click "VicePresidents", I'd like it to go to VicePresidentsHome.aspx

However, I'd like the menu to expand to

VicePresidents --
-->> John Smith, VP of Sales
-->> Mary Jones, VP of Development
-->> Ken Tucker , VP of Internal Affairs


I'd also like to be able to build/edit their pages from time to time.
And I'd like to be able to create a new page, and a new menu item .. for
example:
if .... Rosie Rickles, the new VP of Exporting gets hired.

I'd like the person who edits/adds a new VP page.. to not have to be a "wiz"
at html.


I'm not the dumbest asp.net developer in the world. But like to see some
ideas on how to go about this problem.

I'm NOT interested in DNN (dot net nuke).

Thanks for any general ideas.
And/or specific controls that allow html editing.

...

Sloan
spaces.msn.com/sholliday/


I've thought about

VPDetails.aspx?VPID=123
and read the content from the database.

VPFiles/38901067-6F5A-463b-9796-D1AA2FFFCB0B.html
where I use a unique identifier, and write out the html for a specific VP
out to file.
and I keep a list of the VP name and their corresponding guid.html file in
the database.

But of course, with either method, I have to get the VP entries into the
menu also.


...


I am using 2.0 ... fyi. And am famaliar with the menu/breadcrumb controls.
 
R

rasdanATgmailDOTcom

The ID and database issue makes the most sense to me. You can add menu
entries to the menu dynamically rather easily.
Menu1.Items[index].ChildItems.Add(new MenuItem(<look at overloads for
appropriate one for you>));

where index represents the 0-based position of 'Vice Presidents' in
your menu.

James
 
A

Alan Silver

sloan said:
if I click "VicePresidents", I'd like it to go to
VicePresidentsHome.aspx

However, I'd like the menu to expand to

VicePresidents --
-->> John Smith, VP of Sales
-->> Mary Jones, VP of Development
-->> Ken Tucker , VP of Internal Affairs

This bit could easily be done if you have a web.sitemap file that
contains these links. You can write a custom control (dead easy, search
for some samples) to output basic HTML, such as...

<ul>
<li><a href="default.aspx">Home</a></li>
<li><a href="VicePresidents.aspx">Vice Presidents</a>
<ul>
<li><a href="VP_JohnSmith.aspx">John Smith</a></li>
<li><a href="VP_MaryJones.aspx">Mary Jones</a></li>
<li><a href="VP_KenTucker.aspx">Ken Tucker</a></li>
</ul>
</li>
<li><a href="contact.aspx">Contact us</a></li>
</ul>

This could be styled with CSS to look how you want.

The advantage of using web.sitemap over a database is the speed. The
sitemap file will be much quicker, and given that you VP info won't
change *that* often (I hope!!), you don't need the database.
I'd also like to be able to build/edit their pages from time to time.
And I'd like to be able to create a new page, and a new menu item ..
for example:
if .... Rosie Rickles, the new VP of Exporting gets hired.

I'd like the person who edits/adds a new VP page.. to not have to be a
"wiz" at html.

Have an admin page, not visible from the main site, where someone can
enter the details of the new VP. There are plenty of HTML editor
controls around that mean the person doesn't need to know HTML. When a
new VP is added, or one is deleted, you can simply rewrite the
web.sitemap file out again.

If you don't want to have the whole web.sitemap file reliant on this bit
of code, you can have the main file include another sitemap file for the
VPs. I have done this and it's pretty simple.

The actual VP info can be stored either in a database, or in files in
your web site. The latter will be much quicker to process simply by
loading them at run time. You can use URL rewriting to have a single VP
page that pulls the appropriate info out of a disk file. For example,
the fake URL VP_KenTucker.aspx coudl be rewritten to
VP.aspx?vp=KenTucker and the VP.aspx page would look for a file called
KenTucker.html to use for the display. This file would have been written
out by the admin page.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top