Rephrase: Using a user control like a frame.

M

Mark

I am rephrasing a question from yesterday.
I have a page with several user controls : nav, header, and footer
currently.

What I would like to do is add a new control ('content') and use it like a
frame. Specifically like a "content" or "main" frame.
Can I somehow load the content of another, complete html or aspx page into
this control?
If so how?
Ands If so, how can I load the correct page from a link? (IE:
href=somepage.html target=main)
Is this feasible?

Or is this what 'master pages" is for?
I've briefly read about master pages, but it seems pretty complicated in
..net 1.1 .
I'm guessing it will be better supported in .net 2.0.
If what I propose with the user control is not possible or feasible, can
someone point me to a clear tutorial on implementing master pages with .net
1.1, if this is indeed what I'm looking for?

The reasoning behind it: I'm developing a site for a local non-profit (not
paid - its volunteer work) and I really would like to make the site easy for
the staff to update. They will have ftp access, but I don't want them
messing with anything but content, so if they could just upload an html file
be done with it, without touching any of my aspx stuff, that would be great.
Thoughts?

Thanx in advance,
Mark
 
S

Steve C. Orr [MVP, MCSD]

You can load ASCX page snippets dynamically. The problem with loading a
full page inside a page is you've got all the header tags and such twice,
which will confuse the browser. If you could strip out those tags you could
display the body content with few issues. If you need to display the entire
HTML then your only real option is a Frame or IFrame.

Here's more info on IFrames:
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/IFRAME.asp

Here's more info on instantiating ASCX controls dynamically:
http://msdn.microsoft.com/library/d...InstantiatingUserControlsProgrammatically.asp
 
M

Mark

Thanks, Ill weigh my options.
Perhaps I'll just heavily comment he code and mark the sexton where the
content will go with a big "Page content here and only here" sign.

Thanks again.
 

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

Top