master-pages

When is the MasterPageFile located in ASP.NET MVC WebForms ViewEngine

When is the MasterPageFile property of a view/page checked that it exists in ASP.NET MVC WebForms view engine? What I want to do is have the following code not output the error: Parser Error Message: The file '/SomePlaceThatDosentExist/Site.Master' does not exist. Defined as such in my view's .aspx file: <%@ Page Language="C#" Ma...

Can the MasterPage be designated from the Controller?

I have a couple different userTypes (Admin, User) and a MasterPage for each. I am beginning to create some Views that will be used by both userTypes where i would like to assign the MasterPage programmaticly (based on _currentUser). Possible? thx ...

[ASP.NET MVC] What would cause a partial view to suddenly not be found?

I'm baffled. My site randomly throws the following error: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: The partial view '/SiteUserMenu' could not be found. The following locations were searched: /SiteUserMenu at System.Web.Mvc.HtmlHelper.Fi...

Ninject and Master Page injection

First off, I'm using Ninject 2.0 I have my master page which I would like to inject into but I'm not quite sure how. What I tried was created a class that derives from System.Web.Mvc.ViewMasterPage and then I create my properties: [Inject] public ICacheService<List<Category>> Categories { get; set; } [Inject] public IConfigurationSetti...

State in ASP.net Master Page

We have a bug that we are trying to fix. It looks like one user can see another users data it they hit the same aspx page at the same time. I was wondering: If we store data in a property on the master page, will all pages running at the same time see that data. Have a master page: public class MyMasterBase : System.Web.UI.MasterPage ...

StartingNodeUrl - Is it possible to use a Method to set it's value programmatically?

From my Content MasterPage I want get the StartingNodeUrl and programmatically set it: Example of what I'm trying to do: <'asp:SiteMapDataSource ID="SiteMapDataSource1" StartingNodeUrl="<%= SomeMethod()%>" runat="server" /> but that gives the error: Could not find the sitemap node with URL '<%=SomeMethod() %>'. Is it possible to ...

ASP.Net MVC: How can I easily change the tab color of my navigation menu based on the tab that I'm on?

I want to implement my navigation tabs somewhat like the ones on this site, and I've heard that this was built using ASP.Net MVC. If I'm on stackoverflow.com/users, than the "Users" menu tab is orange and all others stay grey, same if a different tab is selected. I am pretty good with manipulating the css to change color when it's hove...

Cache Master Page in ASP.NET

How can I cache the master page in ASP.NET? ...

Javascript pageLoad not executing in a master page

What causes the following pageLoad to not execute in a master page? The first alert executes as expected, but the pageLoad function is not being invoked. How can I use the function within a master/content page? <script type="text/javascript"> alert('test'); function pageLoad(sender, args) { alert('pageLoad'...

how to display none through code behind

I have tried this login_div.Style("display") = "none"; But it's not working.how can I set the display of the div to none through code behind, in aspx I have a div: <div id="login_div" runat="server"> ...

how can i insert login control on the top of default page

in my master page there is a login status when i click on it the page is redirected to login page.now i want to create login control in the home page itself so that users dont have to visit loginpage again and again..i guess i cant create the login control in the masterpage .it has to be in the default page but then how can i put that c...

Masterpage, Intelligencia url rewrite and updatepanel = possible ?

Hello all, I cannot seem to get my updatepanel to work while using urlrewrite. It does work in terms of code execution, but it refreshed my whole page instead of the usercontrol which contains the updatepanel. Am I missing some very basic things here? I hope someone can help me thanks for reading! Kind regards, mark ...

how to setup masterpage programmatically?

the function private void SetUpMasterPage(){ this.MasterPageFile = "~/MasterPages/NestedMasterPageTest2.Master"; } is called on the OnPreInit... This works when the masterpagefile is the base masterpage... But how are we going to make it work for the nested masterpage? we actually tried this.Master.MasterPageFile = "~/MasterP...

how to add controls to the masterpage's content placeholder programmatically

On the base.master: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Base.master.cs" Inherits="WebApplicationControlTest.Base" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <...

Early response termination when using an ASP.NET Master Page

I have a page which needs to terminate execution of it's code (which is run at render) but not stop the execution of the MasterPage. The problem is this, page 'Default.aspx' uses the masterpage 'MasterPage1.aspx'. The code in Default.aspx checks a certain condition and if found to be true, Default.aspx needs to stop executing, but rende...

Proper use of MasterPages

I've been looking into different methods of implementing masterpages. Use the masterpage only for layout, include common controls on every page Include controls on the masterpage, use a masterpage abstract base class and override it's properties in the masterpage class. This caused the masterpage events to no longer wire up. I could ...

How to load content pages async using jQuery?

TGIF, I have a website I'm developing which is using ASP.NET masterpage/sitemap/content pages setup. I hate the "blinking" the site does when navigating between content pages using the asp:menu control. Any suggestions on how to use jQuery ajax instead of AJAX.NET updatepanels? I've used updatepanels in the past and I hate it; clunky an...

MOSS 2007: Changing the masterpage for one page layout

In a MOSS server, I would like a specific page layout to use the selected masterpage. Instead, i want this specific page layout to use a blank master page so i can use that page layout for pop message. I want to use a blank master page so that the my site's navigation menu, header and footer don't appear in my popup. I found this blog ...

how to take the html helper controls in the master page?

Hello All, I want to take two html helpers textboxes on my master page please tell me what shall I do.I want to pass the value in the textboxes from the controller class.Please tell me how can I do that. Thank You Ritz ...

ajax not working with masterpage

I am using a master page... Then there is an .aspx that uses this masterpage.. what i want to use is the ajax NumericUpDownExtender but i am getting an error from the start when i put this in my masterpage <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %> <%@ Register Assembly="System.Web.Ex...