473,407 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Master Pages. Is this impossible in Asp.Net 2.0? I don't know what else to try!

Hello,

I am, for almost 2 days, trying to create a nested master page.

The objective is: create a NESTED master page at RUNTIME.

I looked everywhere and I couldn't find a solution. Basically what I
need is:

Parent.master
| ---Child.master
|---Page.aspx

I know that in Page.aspx I can define, at runtime, the page master file
in the Page.Preinit event:
Me.MasterPageFile = "~/Child.master"

However, in Child.master I am not able to define a Page.PreInit event.
So how to I say to Child.master to use Parent.master as master page.

Remember that I am trying to do this at Runtime and not in aspx code.

Could somebody help me out?

I don't know what else to try.

Thanks,
Miguel

Nov 29 '06 #1
1 1329
Go to http://OdeToCode.com and read some of the best articles about Master
Pages.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h

"shapper" <md*****@gmail.comwrote in message
news:11*********************@14g2000cws.googlegrou ps.com...
Hello,

I am, for almost 2 days, trying to create a nested master page.

The objective is: create a NESTED master page at RUNTIME.

I looked everywhere and I couldn't find a solution. Basically what I
need is:

Parent.master
| ---Child.master
|---Page.aspx

I know that in Page.aspx I can define, at runtime, the page master file
in the Page.Preinit event:
Me.MasterPageFile = "~/Child.master"

However, in Child.master I am not able to define a Page.PreInit event.
So how to I say to Child.master to use Parent.master as master page.

Remember that I am trying to do this at Runtime and not in aspx code.

Could somebody help me out?

I don't know what else to try.

Thanks,
Miguel

Nov 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Nalaka | last post by:
Hi, When an image is put on a master page... the url to th eimage is set relatve to the master page. (at least don't know how top set an absolute URL to image) But the when a content page is...
9
by: Andy | last post by:
Hey all, I'm building out my first project using asp.net v2.0 master pages. It seems that when you use master pages and try to reference document.body.scrollTop it allways = zero/0. The same code...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
2
by: Paul | last post by:
Hello: I am struggling with something that would seem to be very easy. I am using a master page. On the content page (which includes the master page), I have a form with a submit input type...
17
by: MeerkatInFrance | last post by:
There comes a time when you know you are not going to be able to work something out yourself, however hard you try. I have reached that moment. I have a master page and a slave page (or whatever...
3
by: Rolf Welskes | last post by:
Hello, for a large web site project we would like to use nested Master Pages. Unfortunely VS2005 is not able to show pages in design mode when nested Master pages are used. This has the...
2
by: n# | last post by:
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...
6
by: Just Me | last post by:
Hi, I have build a header and footer control which I want to add to my master page, so in essence I want the header, a contact placeholder and a footer. This is something I used to do with...
7
by: TheLongshot | last post by:
I just recently converted a few pages of my application to using master pages. Problem is, in all of my content pages, the contents are centered. I can't figure out why. The markup in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.