.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Disabling viewstate in master pages

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net


I have a question regarding disabling viewstate.

I know how to do this in the page, however if I disable in a master page will all child pages and controls be disabled through inheritance?

Thanks in advance


View Complete Post

More Related Resource Links

Master Pages in MOSS 2007

'MasterPages' feature in sharepoint 2007 makes the entire customization job easy.In 2003 we used to face lot of issues to get the same look and feel and the standard behaviour for overall site. In 2007, customizing the look and feel for the entire site can be done in a simple way by using 'MasterPage' feature.

Master Pages: Master Your Site Design with Visual Inheritance and Page Templates


Master pages in ASP.NET 2.0 solve a problem many Web developers have been solving on their own with a variety of techniques for years - providing a single master template for an entire site. This article covers the details of master pages, discussing their usage and implementation and how they are a natural evolution of custom techniques developers are using today.

Fritz Onion

MSDN Magazine June 2004

Button click in master page use in other pages I have to click twice. Why?


In my masterpage I have a menu with buttons. I want the buttons to do something after click. It works but I have to click twice on the button, why? What do I have to do to just to click once?

how to change default menu tab in master pages?



i have 5 tabs in my master page application. how can i make 2nd tab as default?

any ideas?


Ajax and master pages


I have a site that uses master pages.  Some of my pages use ajax, so they have the scriptmanager on them.  I now have to add some ajax to one of the master pages.  When I try to display a page that already has a script manager on it, I get an error that I can only have one script manager.  Is there a way to deal with this other then searching for every page that uses the master page and ajax and removing the scriptmanager tag? 

I'm hoping to start using Ajax more and more, so I'm really more concerned with best practices then I am about having to find and remove tags.  What is the right way to use Ajax on master pages and some, but not all content pages?

Why do the aks master pages not get applied if the feature is not activated on the top site collecti


I installed AKS 2.0 and activated AKS feature. The problem I found was the aks master pages do not get applied if the feature is not activated on the top site collection. why is so?

example: If i activate the feature on http://<servername>/sites/<sitename> and apply the master page, I dont see any changes.

              But if i activate the same aks feature on http://<servername/ then everything started working on all sites.

              The reason i found is the CSS reference in the aks master pages.

              It reference should be given as follows:

                 for http://<servername>/sites/<sitename> ->  <link rel="stylesheet" type="text/css" href="../../Style%20Library/AKS/Aks_Band_Blueband.css"/>

                 for http://<servername>/ -><link rel="stylesheet" type="text/css" href="/Style%20Library/AKS/Aks_Band_Blueband.css"/>

So my question is, am i missing anything? am i supposed to activate the AKS feature on top level site collection at any cost? if yes, why is so? 

And after applying aks master pages, i see differnece in font sizes. Why the font size is getting changed?


Sharepoint 2007 - Wiki site - New Pages Not Inheriting Custom Master Page


I am working on a SP site (MOSS not WSS) which is heavily customised away from the OOTB layout. I need to create a Wiki site, which was going well - I've created a master page which displays the miniconsole (this was not visible with our customised layout), and made it the default master page for the site. This has been applied to the two standard pages that come with the Wiki site, however when a new page is created, it seems to inherit the default.master, rather than my custom master page - thus not showing the miniconsole.

When I have created a new page, I am able to use SharePoint Designer to attach my custom master page to it, which works perfectly, however this will not be a viable option going forward as end-users create their new wiki pages.

How can I get the new pages to inherit my master page when they are created?


Inherit from multiple master pages


How does one inherit from multiple master pages?


I.e.  I have a base master page that contains several ContentPlaceHolders.









I want to have separate master page files (one for each ContentPlaceHolder) so that I have 4 separate files: 3 ContentPlaceHolders (each adding specific content) and 1 base master page.

The ASPX files will then inherit from the base master page.



Programmatically Hide Master Pages from Site Master Page Settings page?



I know there is a field you can check when you edit the properties of a Master Page in the Master Page Gallery to set a Master Page to hidden but ... can anyone think of a way to programmatically hide specific Master Pages from the Site Master Page Settings page?

Maybe this should be two questions:

  1. How do I programmatically access a Master Page in a Master Page Gallery?
  2. Is there a property that can be set that will hide the page from the Site Master Page Settings page?

Deploying master pages in sharepoint 2007

Present situation:   Client has dev environment and they have customized the default page which comes ootb and is in Page Library. Also Created Master page using Sharepoint designer, and made that master page as the default master page for the site. The proposed solution: For promoting to different environments we will have to move packages WSP's across environments.   The present situation: All the environments were restored by using site collection backup and restore option (stsadm -o restore ...)   The Problem: Can we overwrite the master pages, page templates which are presently in master page gallery and page library by using feature   Or is there a better way of doing this.   Can somebody specify a better option for promoting.  

How to apply skin to master pages

i have master pages set to each page, i want to use skins, but i cannot attach it to master pagedo i need to go in every page and set theme there ?how can i apply it to master page, so that it gets applied to all the pages

master pages / connecting to databases / classes

I have a scenario where I pick up users and query them from active directory for a project, I've put the connection to database etc into the master page.cs for the meantime.Questions are:This is probably not the best place to put the connection query code, as it will do the query everytime the user goes to another page...correct?Would a better scenario be to pick the userDetails up on initial contact then carry the userDetails to each other page, can you use sessions to check if it is indeed that user? Thinking PHP here.Any thoughts would be appreciated!

master pages - how to access content page from master page?

Hello,I have a master page setup that is used throughout my site that is basically a header with a menu. I recently added a textbox and a button to this master page which is to be a quick search box that is available anywhere in the site. When a user enters text into the search box and hits the button, I need to load the actual content page which is used to search and show search results (which also uses this same master page), and have the text entered available so the search can be triggered automatically. Again, this search text box and button is now in my master page so it could be  triggered from anywhere in the app... it serves as a convenient way to do a basic search from anywhere in my app, without having to first navigate to the actual 'search page' that already exists.  You can also navigate to the actual search page, which uses the same master page, where there is many more search options.I'm thrown off by the master page arrangement, which I have not used until this project. What do I do?

Help !!! with VS2010 master pages

i'm developing a site using VS2010 and with my windows vista busniness OS. i used the default VS2010 wizard for new web application to create it. included a folder in the root directory and created new aspx pages to derive from the master page in the root directory of my site. everything shows on the new pages except the jpeg image logo in the master page. But other aspx pages i created in the root directory shows every thing fine.  Please please please !!! can anyone help me to solve this problem?  

Default "area" in master pages

Is there a way to specify a default area for any content specified in a master page?  I have a global master page and a bunch of user controls (.ascx) with action links defined without regard for 'areas' - is there a way to specify the default area to use when rendering action links and the like? The problem occurs when navigating to an area; all the unspecified master page links do not link back to the default area (in my case the root). I.e., Html.ActionLink("Home", "Index", "Home") renders as "/area/home/index" rather than "/home/index". I'd like this to work for all the links defined in the master page file without needing to specify Html.ActionLink("Home", "Index", "Home"new { area = "" } Thanks in advance, Mike

WSS 3.0 - Master Pages - Changes not effective across site

Hi, I am relatively new to sharepoint and I have inherited a new intranet which I want to develop further. The first thing I notice is that some of the sites (i.e. the IT page) uses one master page (last updated in August) and the other pages use a master default which is different (last updated in December 2009). I want to be able to copy the August version and make it effective across all sites. I am not sure how to achieve this. I have tried making changes to the December 2009 file to see the changes take effect (i.e. change a background from red to blue) and it did not take effect across the site. This is probably basic stuff and I have purchased the Microsoft books to help, but I am at a bit of a loss on this one. Can anyone give me some simple directions on how I can make all the sites within our intranet refer to the same master default page? Thanks in advance

session variables and master pages

Hi all: I have a master page and 2 content pages. In the master page I use a session variable. As it, I suppose this session variable is read by the two content pages. But it isn't working. This session variable is read by the first content page and not the second. Why? Thanks in advance if you can help me      
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend