master-pages

How to control elements on a asp.net master page from child page

I have a few pages on my asp.net website that I would like to turn off a control on the master page. Is there a way to communicate with the master page from a child page? ...

Accessing controls on a sharepoint master page

Just wondering if you know how to accessing controls on a sharepoint master page in code at runtime, I using System.Web.UI.HtmlControls.HtmlGenericControl logout = (System.Web.UI.HtmlControls.HtmlGenericControl)this.Master.FindControl("logout_switch"); logout.Style["display"] = "block;"; Which seems to find the control but the change...

are there master templates in html?

I have to build a html website, which will contain about 50+ pages. The whole website will have a common look and feel. I wanted to know if there is a provision of master templates in building html websites, so that like in asp.net i can make a master page and then build html pages deriving from the master page. That way if i have to add...

ASP.NET make a panel visible on click of hyperlink (whilst also cuasing postback for page navigation)

I may be asking the impossible but let me set out my problem: I have a menu in a MasterPage which uses images and mouseover mouseout events for design purposes. On one of the menu options I need to display a set of sub menus options on the click of the parent menu item. The menu item itself also needs to navigate to a specified url. I...

Where do I put javascript in ContentPlaceHolder?

I'm using a ContentPlaceHolder and would like to move the onload="Carousel()" from the body tag of of the .master page body onload="Carousel()" but I don't know where to put it in the content page. I'm trying to implement this http://www.dynamicdrive.com/dynamicindex14/carousel.htm ...

Multiple master pages in a single application

Is it a good design to have multiple masterpages in an application. I am building a website using Asp.net MVC with different type of users like, admin, employee, general user, etc And every user once logged in have different type of controls on the website, so I was planning to use different master page for each user. ...

How to set navigation variables in MVC Masterpages

I need to have some navigation options, that require keys that are specific to the current user, that reside in a masterpage. I need some advice on best practise. In have the following links in a left nav in a masterpage http://www.example.com/manageShop/123 http://www.example.com/addProductToShop/123 http://www.example.co...

Proper way to use jQuery in an ASP.NET MVC 1.0 Masterpages

There are a few pages here addressing usage of jQuery with .net masterpages - fewer re: masterpages in MVC in .net MVC apps. But those few seem to be making distinctions re pre-release versions of MVC. Is there now a consensus regarding how and where to include the lib and what potential problems we need to be aware of? It _looks as th...

Can you have multiple levels of master views in ASP.NET MVC?

Possible Duplicates: Are there nested master pages in ASP.NET MVC? Creating nested master pages in ASP.NET Web Application Duplicate Are there nested master pages in ASP.NET MVC? Can you have a master view in ASP.NET MVC that inherits from another Master View? My reasoning is this: I have some pages that need to si...

MasterPage with multiple contentplaceholders

I have a default.aspx file that is tied to the MasterPAge and ContentPlaceHolder1 and displays fine, is there a way to have another page say info.aspx auto display in ContentPlaceHolder2? ...

CSS not updated during debugging ASP.NET MVC application

I am working on a test application based on ASP.NET MVC. I am new to CSS stuff so I am learning that as well. I have created a master page called "new.master" and created a new css "new.css". I am calling the view from controller as: return View ("About", "new"); What I am doing is that I am frequently updating the css and master pag...

Not able to set text property of asp:label

Ok, I thought I knew how to do this.... even though it has been one year since I last programmet .Net. Update: I've moved my code from the MasterPage to an aspx Template. And still nothing is displayed. In my aspx templatefile I have the following code: <asp:Content ContentPlaceHolderID="mainAndRightRegion" runat="server"> My l...

Fetch userdata on each request

Hi! Gotta tell you... I've searched the internet for weeks now, and still haven't found a reasonable answer. My problem is quite simple - I think. I'm doing an ASP.NET MVC project. It's a project that requires the user to be logged in at all time. I probably need the current users information in the MasterPage, like so; "Howdy, Mark - ...

Two-step view with ASP.NET MVC

Hi, I was programming in Zend Framework and now I am also using ASP.NET MVC. What I liked in Zend Framework is that the layout (something like Master page in ASP.NET world) is rendered AFTER the main content, so you can use html helper to insert javascript or require some css/js files while generating the main content and than the htm...

Referencing types not in the App_Code folder from asp.net application

I have a master page in a asp.net project, which provides a method that I would like to call in derived classes through an helper function, so I tried to create a base class for my pages: // the master page public partial class TheMasterPage : MasterPage { public string TheMethod(string s1) { // ... } } // base class pr...

Javascript Issue on MasterPage

Hey All, I've got a piece of JavaScript that clears the data in a text box. The code works fine on a standalone page, but on the master page its not working. On the default page my JavaScript is: <script type="text/javascript"> function doClear(searchBox) { if (searchBox.value == searchBox.defaultValue) { ...

How to dynamically show/hide a style sheet inside a content control?

I have a master page with a contentplaceholder control inside the head tag so that I can easily add any contents to the head tag (like link tags, styles, scripts .. etc) from the content pages. Now, on one of the content pages, I have a style sheet (inline, ie. inside a style tag, not linked with a link tag) that I want to show/hide dep...

Use the same CSS file for masterpage and page content

I have an APS.net app (C#) with several pages that use the same MasterPage. In that page, I have included a couple stylesheets like so: <head runat="server"> <link href="/apps/_lib/ui/styles1.css" type="text/css" rel="stylesheet" /> <link href="/apps/_lib/ui/styles2.css" type="text/css" rel="stylesheet" /> </head> These styles apply c...

How can I get the Google Mini seach results, using the iFrame, to not open in the iFrame

I have an asp.net site using the Google Mini. I have a search box on the masterpage that redirects to a search results page that displays the results in an iFrame. This approach is all taken from the documentation provided by Google for the Mini and seems pretty simple. What the doc doesn't cover (or I can't find) is that clicking on ...

MasterPage textboxes are empty when accessed in code

I have this website that has a MasterPage and some content pages. The MasterPage contains a div that I pop up when the user clicks a 'Log In' link that is also located on the MasterPage. This login form has two textboxes, one for user name and one for password, and when the user submits the form they should be authenticated and there u...