master-pages

Master Page Hierarchy

Say I'm currently in the code-behind of a root master page of the web site, and I need to know all the different master pages the page is going through to get to me. How do I do that? this.Page does in fact give me a reference to the page. But when I get this.Page.Master, it seems to give me a reference to back to me even though I know ...

Updating an Image in Master Page

I have an Image control (for logo) on the master page as follows: <asp:Image ID="imgLogo" ImageUrl="~/Images/logo.jpg" runat="server" /> I am allowing my users to upload their own logos. So on the page where they upload their logo I want to replace the existing logo with the newly uploaded logo. I tried the following but none of them ...

Code on MVC Master Page

Hello All, I want to write a code on the mvc master page please tell how shall I do that,My requirement is that I want to show the tab clicked as highlighted. Please help me Thanks Ritz ...

When does an event of a master page fire? What is the order of firing events between Master page and Content page in asp.net?

hi When does an event of a master page fire? What is the order of firing events between Master page and Content page in asp.net? ...

Using C# , how can I set a content page property when users clicks on a TabStrip (user control) in master page ?

I have a web page (Orders.aspx) that gets some orders and show them in a Gridview . The orders list I get from DB is depend on a field named Status. The page has a master page that contains a Tab user control. The user control has several tabs and every tab has a different Status. Therefor, when the user clicks on every tab, I want to ...

What's the possible best way and correct page event to access the Masterpage's Viewstate from a Contentpage in asp.net?

hi What's the possible best way and correct page event to access the Masterpage's Viewstate from a Contentpage in asp.net? ...

Asp.net: Can we use MasterPage's viewstate in ContentPage ?

Hi Asp.net: Can we use MasterPage's viewstate in ContentPage ? ...

Share Site Map Across Multiple Projects

I had this big problem. Now, I've refactored my code to have a data layer, business layer and the main project as the view layer. Next I'd like to split this big project smaller projects based on discrete functionality. As I understand it, one way to handle a shared masterpage is to copy it into each project, that's not the worst ...

How can I access a Masterpage property from a base class or other functions file

I'm accessing Masterpage properties from a regular ASP.NET C# page by doing the following: ((SecondMasterPage)(Page.Master)).speciallink = true; ((SecondMasterPage)(Page.Master)).specialspan = false; That works fine in a page's code-behind, but when I try to move it to a function in my base class file like this: public class MyBase...

MVC: C#: display content of a contentPlaceholder twice

Hi I'm writing an MVC C# application. I use a masterPage and have the title and content of other pages put in contentPlaceholders, which are displayed on the master page. On the MasterPage, I want the TitleContent written in both the <title> tag and in the <body> section (in a <h1> tag). I'm not allowed to do this, because for some od...

Choose Header in ASP.NET Page

I have created a master page (Site.master) which contains the code to display a header, a footer, and a side bar. It works really great, but I am having trouble figuring out how to dynamically choose the header. Basically, there are two possible header options. If the user is not logged in, I want them to see a login box and links for...

Is it possible to set MasterType programatically?

A page could have an attribute MasterType to make Page.Master to be strong-typed: <%@ MasterType VirtualPath="~/Site.master" %> If all my pages inherits specific class inherited System.Web.UI.Page itself, can I someway get access to this.Master property in it so I could call master page's methods? ...

Globalization in Masterpages

Hi to All, As i know, In ASP .net web forms, we can get text (or any other attributes of asp.net controls) value of the control directly from a resourse file in App_GlobalResources folder through expression attribute of the control without writting any code. ( selecting the control going to its expression property selecting the text s...

how to avoid the Refresh in MasterPage in ContentPage

Hi There, I have a masterpage with a timer that shows server time and refreshes every second, on the content page I have a chat program with ajax, refreshes every to second to get the last messages entered. I have a Html TextBox and a hidden Submit Button, when user write a text, and hit the enter, I check to see if this is the enter k...

Can I use the same content page with two different master pages ?

I have an asp.net content page which is used inside of a master page (with header, menu and some links). I would like to reuse it in a different context without the master page (to not display the header and menu there), or with an empty master page if this is somehow possible. I don't want to violate DRY principle by taking the whole pa...

Sharepoint default.master propagation?

We have a large collection of MOSS 2007 sites that need a chunk of javascript added to them. I edited, checked in, published, and approved this change to default.master and the change is reflected on the root site, but none of the subsites. I'm a little nervous to use the "Reset all subsites to inherit this Site Master Page setting" in ...

Parameter from codebehind to jquery [ Master Page]

Hi All, I am creating Menu in the master page using JQuery. i am passing the id of the link to jquery using $.ajax({}); Problem: Getting failed: Showing error message in AjaxFailed(result) function. Code:html[JQuery] $.ajax({ type: "POST", url: "Master.Master.cs/UserStatus", contentType: "appli...

Jquery session Lifetime

Hi All, I am stroring the selected link id in the session. I want to read this session after page gets opened to hi-light that link. But the session gets cleared. Code: $("div.menu_body a").click(function() { $.session("ActiveLink", "#A3"); alert($.session("ActiveLink"));---------> Has id ...

Can I test the override for OnAuthorization in an ASP.NET MVC controller base class?

The mechanics of making this work aren't hard, but testing it is a little strange. The scenario is that I want to dump some basic user data into the view data based on the User property of a base controller (an IPrincipal object) so that the master page always has it. I need access to my IUserManager (a service class), which is provided ...

Silverlight and corporate designs

In the near future I want / will design an intranet application, which should be mainly based on Silverlight (version 4). There is the prerequisite, that this application should use he corporate design of my company. This corporate design is quite complex. Templates (HTML / Javascript) for that already exist, but there is no enforcement...