newbie: Master pages... dynamic content...

C

celoftis

Using VS2005, VB codebehind,
I'm porting a windows app to the web - My main page is very simple and
will look something like this:
---------------------------------------------------
| Title |
---------------------------------------------------
| | button navigation bar |
| | --------------------------------------|
| | |
| Menu| |
| | Content |
| | |
| | |
| | |
-------------------------------------------------

Menu is a treeview control that is (potientially) different for each
user that visits the site. (nodes are dynamically populated in the
treeview via code behind based on user's role and auth. level)

The Content can be any object renderable by a browser (HTM, flash, pdf,
office document, etc).

The question is can i display different web forms in the content part
when the menu is clicked?

I've looked at master pages but from what I understand they would only
be able to display HTM in the "Content" area. Does anyone have any
ideas on how to allow the content area to display other types of
objects?
Can anyone help a web rookie ?
 
C

Cowboy \(Gregory A. Beamer\)

You have some incorrect notions.

Master pages can have dynamic content. The isue is they are a little harder
to ahve the page update master page content, but it is not impossible. And,
if you have the master page render dynamically, there is no issue. I see no
reason why a user driven menu cannot be placed in a master page.

If you use master pages, the different content is fairly easy. If not, you
will need another option. DotNet Nuke is an option and would be easier than
rolling your own.

Third choice, way out in left field, is to create your own engine to render
the pages. I would inherit from page to do this, as you can have your class
handle most of the lifting. User controls are also an option for content, if
you wish to use a model-view-controller type of set up. I would shy away
from any of these choices, esp. as a rookie, unless the master pages and
DotNet Nuke fail to work.

NOTE: Check out the starter kits under downloads at www.asp.net. They will
give you a good framework to start from.
 
B

BillE

I have a treeview in a master page, and I display pdf files(EKGs and X-Rays)
in the content pages using an <embed> tag. The 'src' attribute of the embed
tag is assigned when the content page loads based on the query string used
to open the content page when a treeview node is clicked.
 
C

celoftis

Gregory,
Thanks for the reply. I'm excited at the possibility of making this
work.
I've got hundreds (if not a thousand) content pages that I need to be
target for the "child page". Problem is I don't want to modify all
the pages - in fact, the majority of the pages are on remote servers
that I have no access to - so I really just need to be able to point
to a URL and have it load in the child page. Can I still use master
pages to make this work?

I've reviewed ASP.NET downloads haven't found anything that suits my
situation - any other pointer or code snippets would be greatly
appreciated! Please Let me know what you think either way.

celoftis
 
D

David Wier

The content inside a 'child page' needs to be inside a ContentPlaceHolderID
control. Also - the page needs to have the .aspx extension and have a
reference at the top of that content page, to the master page.
 
C

celoftis

David,
Thanks for the reply...

So, for my specifc situation (not being able to access all the content
pages), it looks like master pages are not going to work - do you
agree?

But if I could modify the content of all the child pages, then I could
use a script to wrap the existing page(s) with
ContentPlaceHolderID(s)... seems real messy.
 

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,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top