Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Master Pages. Is this impossible in Asp.Net 2.0? I don't know what else to try!

Reply
Thread Tools

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

 
 
shapper
Guest
Posts: n/a
 
      11-29-2006
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

 
Reply With Quote
 
 
 
 
clintonG
Guest
Posts: n/a
 
      11-29-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
impossible to delete file because it is impossible to take ownership Devvie Nuis Computer Support 21 04-20-2009 02:07 AM
impossible to have initialization script in master page content? PJ6 ASP .Net 1 09-17-2007 02:36 PM
Making the simple impossible and the impossible unthinkable... xfx.publishing@gmail.com Perl Misc 5 06-30-2006 11:50 AM
a tricky if else(maybe not tricky but impossible) nirkheys@gmail.com C Programming 9 04-25-2006 06:13 PM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM



Advertisments