master-pages

Log Error: Failed to create list

Hi, I have a Site Template with few customized lists and customized pages. I create new webs when ever needed using the site template. After creating the web, I also set up a theme and unique permissions to the web using C# code itself, then I redirect the page to the newly created web URL. My code runs within a Long running operation. ...

Where to insert script blocks

The dillema is like this: If I try to fit all the scripts blocks on the masterpage (include page in some frameworks), every page gets a copy of every script (including the ones they don't need) and these quickly adds up and bloats the page size. If I include/insert script blocks where needed, javascript will be spread all over the proj...

Problem using UpdatePanel with Masterpage in C#...

Hi guys... My code : <%@ Page Language="C#" %> <script runat="server"> void button_Click(object sender, EventArgs e) { label.Text = "Refreshed by server side event handler at " + DateTime.Now + ".<br>Value provided:" + text.Text; } </script> <html> <head> <title>How to update an UpdatePanel with JavaScri...

How to access controls inside a nested master page? why does it behave differently from content pages?

Is there a difference between these two scenarios: (1) Accessing a property on a master page from a regular child (2) Accessing a property on a master page from a nested master page I tried to access a textbox in the master page from a content page like this: TextBox a; a = (TextBox)Master.FindControl("ayyash"); // Master is declared...

Access Master Page Control...

I am using a UserControl Which is present in the Master Page. I need to access a Master page control in the UserControl. I need your suggestions. The Scenario is A label is present in the Master Page. Based upon selections in the usercontrol i need to modify the masterpage label. The UserControl is present in the Master page itself not...

Find the atrributes on an action from the ViewEngine in ASP.NET MVC

I've got a custom ViewEngine and I want to modify the master page used depending on if the requested action has an Authorize attribute filter. So far I'm just using reflection like this: var method = controllerContext.Controller.GetType().GetMethod(viewName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase); if (me...

ASP.Net Menu Control renders incorrectly when used on a Master Page

I'm struggling to find a solution for a weird issue with ASP.Net Menu control, when used in conjunction with Master Pages. When the user navigates to a page - via. the menu - which inherits from the Master Page, the entire menu just expands and flashes across the screen. Collapses immediately and the page is rendered.... Causes some fli...

Strange Problem with asp.net website

Hi I've built an asp website and i have the following issues:- i'm using a master page in it and have defined two contentplaceholders one in head one in content, and i've specified the page title in the top most directive at the @page directive but the page title doesn't show up. I have to manually add a tag for it. Secondly when i cr...

webpart control in master page

Hello all, I have a webpart in a control that I am using on a webpage. The webpage uses a master page and there is a content holder in the MP that can hold controls for alignment/design issues. Everything works well with this but the webpart control. When i put the webpart in the container i lose the ability to move the webparts around ...

Accessing a Master page Control from a separate Class

I've been reading the other questions dealing with master pages, but I didn't see any that quite had the answer I'm looking for, so... I have a master page. I have a control(Control A) on the master page. I have a certain content page that I want to disable (Control A) and enable (Control B). Instead of doing this on the content page, ...

Master Page

I need to ask if I have master page that contain button as an example then I add new webform(default) and I assign that master page as default form master page.the question is can I change the text of the button in default page code? ...

Accessing a Property of a Master Page from a class that's not part of a content page in ASP.NET

So I'm wiring up my first MasterPage, and everything is working great except for one thing. This is a legacy app, and I have an old BasePage class that all my content pages inherit. It inherits from System.Web.UI.Page, but has no content itself (no .aspx file). It runs a bunch of the user authentication/role granting menu building. I...

Why won't postbacks work on my domain root?

I have a form on a masterpage which is very simple but will not work when the site is at the root. Works fine: www.mysite.com/page.aspx www.mysite.com/another/page.aspx Does not work: www.mysite.com I click the button and it postsback to www.mysite.com/default.aspx But nothing has executed, now if I try the for...

How do I reference a master page from an aspx page?

How do I reference a master page from an ASP.NET webform? The following statement does not work: this.MasterPage.Page.Title = "My Title"; ...

ASP.NET Master Page + pageLoad() = kills jquery?

In my MasterPage, I have a ScriptManager that has a ScriptReference to my jquery.js file. This has always worked with no problems, all content pages that utilize jquery work fine. Recently, I added the following javascript script block at the end of my MasterPage: function pageLoad(sender, args) { } By simply adding the above pa...

Filling in parent master page from child

I'd like to have a page that uses a child master page, fill in a content placeholder of the parent, but I cannot get it to work. Whenever I try I get the error "Cannot find ContentPlaceHolder 'customHead' in the master page '/templates/info.master', verify content control's ContentPlaceHolderID attribute in the content page." I have a ...

Strongly typed master pages polymorphism - nested masterpages ignore inherit attribute

I'm currently creating a CMS system and found that the following doesn't work. I do have a work around that isn't exactly ideal and feels dirty. I'm cool with it for now and not really that interested in a different approach (but don't let that stop you answering). What I am after is some kind of explaination on why it doesn't work - is...

MasterPage using Masterpages, and inheritance

I've got a "Master" Masterpage, and I've got 2 "Sub" Masterpages. Those 2 subs have their masterpage property set to the "Master" Masterpage. All good so far. Well, I was told today to also make Sub1 and Sub2 actually "inherit" from the Master Masterpage. I thought they were being imprecise with their language, but no, she wanted me ...

Hook a javascript event to page load

I have an aspx that has the following javascript function being ran during the onload event of the body. <body onload="startClock();"> However, I'm setting the aspx up to use a master page, so the body tag doesn't exist in the aspx anymore. How do I go about registering the startClock function to run when the page is hit and still hav...

Are there nested master pages in ASP.NET MVC?

I wanted to know if the MVC framework can leverage the Nested Master Page? If so does anyone have some info on how to achive this? ...