CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 9/15/2004 7:04:59 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 31 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
kindohm
Asp.Net User
master pages across multiple web apps9/15/2004 7:04:59 PM

0/0

Is it possible to re-use a single master page across more than one ASP.Net application? In my development team where I work, it is important for us to maintain the same look, feel, and common "global" navigation and functionality across all applications. So far from what I have tried with the 2005 Beta, it is not possible. Anyone have success trying this or an idea of how to get it to work?

Fredrik N
Asp.Net User
Re: master pages across multiple web apps9/15/2004 7:29:07 PM

0/0

No, you can't do that. The MasterPage file must be located within the same application where you use the MasterPage.
/Fredrik Norm?n NSQUARED2
Microsoft MVP, MCSD, MCAD, MCT

Cornerstone

My Blog, ASP.Net 2.0 etc
tinghaoy
Asp.Net User
Re: master pages across multiple web apps9/17/2004 5:35:23 PM

0/0

There are 2 really advanced approaches that you can try.
1. Create two virtual directories inside your applications, one per each app. Map the two virtual directories to the same physical directory where your master page file is defined.
2. Implement your own virtualpathprovider and maps the masterpages to the same physical path.

HTH,
Ting-hao
This posting is provided "AS IS" with no warranties, and confers no rights.
gaylonb
Asp.Net User
Re: master pages across multiple web apps12/1/2004 8:36:32 PM

0/0

I posted thsi in another thread and will post it here as well...

I have done this and it works pretty good.

Example...

/Shell/
-----/MasterPages/
----------/masterPage.master


/App1/
-----vdir to /Shell/

/App2/
-----vdir to /Shell/

In app1 and app2's web.config I can set my masterpagefile to ~/shell/masterpages/masterpage.master and both app1 and app2 render fine. The master page includes a nav control that picks up the local .site file in both the applications.

the /Shell/ external folder will contain themes, and other shared things in the future for all my applications.
madaboutnoggins
Asp.Net User
Re: master pages across multiple web apps3/5/2007 1:12:19 PM

0/0

Hi there

Can you give me an example of the code you would use to reference this virtual directory?

I have a virtual directory in my web app called "MasterPages" which refers to a physical location on the server. In my web pages I am referencing the master page file using the following:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Complaints.aspx.cs" Inherits="Complaints"
MasterPageFile="~/MasterPages/MasterPage.master" %>
<%
@ MasterType VirtualPath="~/MasterPages/MasterPage.master" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"></asp:Content>

 ... and how do I put the reference to the master page in the web config?

Also, when I restart IIS after creating my virtual directory, the directory disappears and when I try to recreate it, it says to use a unique alias because it already exists, when it obviously doesn't. Any thoughts?

Cheers


JD
Web Monkey
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005
Pro C# 2008 and the .NET 3.5 Platform Authors: Andrew Troelsen, Pages: 1370, Published: 2007
Wrox's SQL Server 2005 Express Edition Starter Kit: Express Edition Starter Kit Authors: Rajesh George, Lance Delano, Pages: 353, Published: 2006
Core Internet Application Development with ASP.NET 2.0 Authors: Randy Connolly, Pages: 1049, Published: 2007
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
ASP.NET 2.0 MVP Hacks and Tips Authors: David Yack, Joe Mayo, Scott Hanselman, Fredrik Normén, Dan Wahlin, J. Ambrose Little, Jonathan Goodyear, Pages: 400, Published: 2006
Pro VB 2008 and the .NET 3.5 Platform Authors: Andrew Troelsen, Pages: 1377, Published: 2008
ASP.NET 2.0: Your Visual Blueprint for Developing Web Applications Authors: Chris Love, Pages: 339, Published: 2007
SharePoint 2007 and Office Development Expert Solutions: Expert Solutions Authors: Randy Holloway, Andrej Kyselica, Steve Caravajal, Pages: 324, Published: 2007

Web:
Multiple web-apps under one master page site? Talk about Multiple web-apps under one master page site? ... me to get the sub- site operating with the master pages held in the root ...
Multiple web-apps under one master page site? - bytes Master Pages. I'd like to know if it is possible to have separate web app projects use the master page(s) from their "parent" site. ...
Share your user control across multiple web applications Sep 11, 2003 ... As we want to share our library across multiple web applications we must .... Pages and MasterPages in a single Web Application Project ...
Introducing ASP.NET 2.0 Master Pages Dec 15, 2003 ... This article shows you how to use the new Master Pages feature to create consistent page layouts for your Web applications. ...
Web Parts in ASP.NET 2.0 At first glance, it may seem that Master Pages are the solution to the issue, ..... Subject: Sharing Web Parts across multiple pages wite SharePoint ...
Sharing Master Pages Across IIS Applications - Dan Wahlin's WebLog ASP.NET, AJAX, Silverlight and Web Services Exploration ... I believe I have a way to share master pages across multiple IIS applications. ...
WorldofASP.NET: Working with Master Pages and Basics of Master ... Aug 23, 2007 ... Now, Let's start implementing MasterPages in your web applications. We are going to have 1 Master Pages, and two default Pages in the ...
Themes and Templating Master Pages - Rick Strahl's Web Log You can store multiple master pages and use this same mechanism. ... am searching for a way to use master pages across websites or web applications, ...
Customizing Application Master Pages - part 5 of 6 | SharePoint ... Oct 31, 2008 ... Examining the out of the box Master Pages in SharePoint. .... If we had multiple web applications running, could we not check the top-level ...
using shared code across multiple sites : shared code, master pages shared code, master pages. Hello Experts, I'm currently in the process of converting a bunch of web sites I manage from classic ASP to ASP . ...

Videos:
A New Way to look at Networking Google Tech Talks August 30, 2006 Van Jacobson is a Research Fellow at PARC. Prior to that he was Chief Scientist and co-founder of Packet ...
Using ROSE to Mitigate Performance Trade-offs Google TechTalks April 03, 2006 Daniel Quinlan ROSE is a tool for building source-to-source transformation tools for the optimization of C ...
Santa Monica Council Meeting Santa Monica Council Meeting




Search This Site:










problem with server variables

order by priority text boxes

displaying foreign characters

custom registration form

values from text file - drop one digit

display text bottom top in an aspx page

clearing selected value from a textbox

use nvarchar as datetime in criteria

compare validation of maxdate fails

download multiple files from server

turning off validaterequest programatically

sitemap and search

fileupload and database and url's

file uploading problems with html form input

how to change textbox.text value under postbacked state

err bug in .net 2.0?

users in roles drop down list

textbox will not resize scrollbar correctly

dayview calendar render

navigation menu linkbuttons not responding

how to share single login between 2 web applications?

regex for a password with 8 characters, begins with an alphabet and contains atleast 1 special character and 1 digit?

resizing window to fit

retrieving value from combined textbox

data presentation

displaying a global.asax value in another form

loading an image takes long..

dynamically creating a variable

help - asp/asp.net cookie.......

question about imagebutton control

  Privacy | Contact Us
All Times Are GMT