The Artima Developer Community
Sponsored Link

.NET Buzz Forum
RE: Master-Page-Limitation in ASP.NET 2.0

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jason Nadal

Posts: 184
Nickname: jnadal
Registered: Dec, 2003

Jason Nadal is an asp.net developer, dabbling in winforms from time to time.
RE: Master-Page-Limitation in ASP.NET 2.0 Posted: Jun 28, 2004 6:09 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Jason Nadal.
Original Post: RE: Master-Page-Limitation in ASP.NET 2.0
Feed Title: Jason Nadal
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/jnadal/Rss.aspx
Feed Description: Restless C#ding
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Jason Nadal
Latest Posts From Jason Nadal

Advertisement
How great is this? It would seem that dynamic master pages are in fact possible. I just wonder what this will do to page performance....

The concept of Masterpages introduced in ASP.NET “Whidbey” is really fascinating. But it seems to have one major limitation, which appears to make it quite unusable in bigger Web-Applications: There seems to be no functionality, which allows a developer to programmatically change the used Master-Page at runtime.

If you think so, you should read this article: http://msdn.microsoft.com/msdnmag/issues/04/06/ASPNET20MasterPages/default.aspx

After reading this, you'll be able to change the MasterPage at runtime using the new PreInit-Event:

protected override void OnPreInit(EventArgs e)
{
  this.MasterPageFile = "OtherTemplate.master";
  base.OnPreInit(e);
}

Protected Overrides Sub OnPreInit(ByVal e As EventArgs)
   Me.MasterPageFile = "OtherTemplate.master"
   MyBase.OnPreInit(e)
End Sub

And after all, the concepts of MasterPages should work. :-)

Thanks to Scott Galloway (http://www.mostlylucid.co.uk) for his hint on this topic.

[Via K Samaschke & Scott Galloway]

Read: RE: Master-Page-Limitation in ASP.NET 2.0

Topic: TechEd 2004 - windows media and slides download area Previous Topic   Next Topic Topic: T-2 Days - Take of ...TechEd Amsterdam ... fasten your seat belts ...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use