Porting to Master Page Model

N

n#

I have an old existing website with a Header/ Left Hand Menu and a
iframe as the main body content, adjacent to the menu. So for every
click on the menu item, I used to load a aspx page on the iframe and
hence i am not loading the entire menu and header for each request.

When I try and port the above model to Master Page

1) The menu ( I thot of having the Menu Web control), Header would be
moved to the master page.

2) The each aspx page, which used to load in the iframe would now
include the master page.


Is this approach right. But I still don't see the flexibility of
loading the page only for each menu clicks.

Ofcourse I am not interested in using the viewstate and autoevent wire
ups - as I am very happy with the HTML/Javascript over server side
control.

I thot of using menu web control only for the ease of loading my
menu.xml and rendering as a typical html using control adapters. I am
not interested in using the events of those controls.


Ofcourse I am done with initial porting. Anyway I am not getting the
css and look and feel. (But anyway I confirmed the css path hasn't
broken. It does url-rebasing perfectly.)

Is my approach correct while porting my existing website to master page
model?

What may be the reason for me not getting the styles applied. ( sorry
for being asking a code related issue)

My master page contains the link to the css.

<link href="~/styles/styles.css" type="text/css" rel="stylesheet" />

How good the master page and usercontrols gels?
 
E

Eliyahu Goldin

You don't say what was your motivation for switching to master pages. In no
way should you look at iframes as an old technology and master pages is the
new one. They don't compete. Some scenarios are good for iframes, other are
good for master pages and in some case you can use both. Looks like iframe
was the right idea for your app, why should you change?

Re your question on applying styles, do you have the content and the master
pages in the same directory? If they are not, you have to realize that the
resulting html knows nothing about the master page's directory. All path
references should be based on the content page location.
 
N

n.net

No, my master and the page are very well in the same directory.
Let me dig my code. I know its impossible for ppl to help with my mess
:)


Eliyahu said:
You don't say what was your motivation for switching to master pages. In no
way should you look at iframes as an old technology and master pages is the
new one. They don't compete. Some scenarios are good for iframes, other are
good for master pages and in some case you can use both. Looks like iframe
was the right idea for your app, why should you change?

Re your question on applying styles, do you have the content and the master
pages in the same directory? If they are not, you have to realize that the
resulting html knows nothing about the master page's directory. All path
references should be based on the content page location.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


n# said:
I have an old existing website with a Header/ Left Hand Menu and a
iframe as the main body content, adjacent to the menu. So for every
click on the menu item, I used to load a aspx page on the iframe and
hence i am not loading the entire menu and header for each request.

When I try and port the above model to Master Page

1) The menu ( I thot of having the Menu Web control), Header would be
moved to the master page.

2) The each aspx page, which used to load in the iframe would now
include the master page.


Is this approach right. But I still don't see the flexibility of
loading the page only for each menu clicks.

Ofcourse I am not interested in using the viewstate and autoevent wire
ups - as I am very happy with the HTML/Javascript over server side
control.

I thot of using menu web control only for the ease of loading my
menu.xml and rendering as a typical html using control adapters. I am
not interested in using the events of those controls.


Ofcourse I am done with initial porting. Anyway I am not getting the
css and look and feel. (But anyway I confirmed the css path hasn't
broken. It does url-rebasing perfectly.)

Is my approach correct while porting my existing website to master page
model?

What may be the reason for me not getting the styles applied. ( sorry
for being asking a code related issue)

My master page contains the link to the css.

<link href="~/styles/styles.css" type="text/css" rel="stylesheet" />

How good the master page and usercontrols gels?
 

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,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top