Visual Studio .NET - Disable Master page

Asked By Bhavesh D
23-Apr-07 08:10 AM
Hi,

I have a page A.aspx; is using one master page. I need to disable master page in one condition in A.aspx.
A.aspx having multi purpose usage.In one case I need to display master page information & in another case I don't want to display master page information.

Is it feasible ?

Please Advice,
Thanks,

Bhavesh Darji

Two suggestions...  Two suggestions...

23-Apr-07 01:10 PM
1) On your master page, create ALL of your items as controls. When you hit your target situation, have your content page access the master and hide all of the controls.

2) Create a second master page that is effectively blank. Then use the PreInit method of the page to check for your target situation and load the blank master page instead.
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As EventArgs) Handles Me.PreInit

If SpecialSituation = True Then
Me.MasterPageFile = "CustomAppBlank.master" End If End Sub

2nd suggetion = true  2nd suggetion = true

24-Apr-07 06:23 AM
Hi Sean,

We have follow your 2nd suggetion & we got success.

Thanks for your kind support,

Bhavesh Darji
Create New Account
help
Wise for Visual Studio.NET Wise for Visual Studio.NET By Peter A. Bromberg, Ph.D. To "Print This Page" Link Peter Bromberg Wise for Visual Studio .NET is a total and complete installation development system for creating and editing Windows® Installer
Visual Studio .net .NET Framework Hi NG, ich habe vor längerer Zeit mit Visual Studio .Net 2003 gearbeitet und überlege momentan auf einen neueren Stand upzudaten. Ein Visual Studio .Net 2008 scheint es nicht zu geben. Habe zumindest mit googeln nichts gefunden. Was
Visual Studio versioning . . . . how to tell? .NET Framework To my knowledge, Visual studio 6 was released in 1998, then Visual Studio .NET 2002 is VS 7, then Visual Studio .NET 2003 is VS 7.1, then Visual
visual studio.net 2003 and Access 2007 database .NET Framework Hi I am currently using Visual Studio.Net 2003 running on Windows Server 2000 operating system. I have used Visual Studio.net 2003 connecting to Access 2002 databases in the pass with great success. Now
Is Visual Studio self-hosting ? .NET Framework Does Microsoft use Visual Studio IDE, Visual Studio Debugger, Visual Studio Linker and Visual Studio compiler for developing Visual Studio ? Or is Visual Studio not