Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8585685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:07:41+00:00 2026-06-11T22:07:41+00:00

On an ASP.NET 4.0 website I am working on I have a master page

  • 0

On an ASP.NET 4.0 website I am working on I have a master page where I have set ViewStateMode=”Disabled”. There is then a nested master page for one section of the site where ViewStateMode=”Enabled” as ViewState is required for much of this part of the site. On child pages for this section ViewState is not being maintained for controls like DropDownList.

There are no other ViewState directives anywhere else on these master pages or child pages.

Master page:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="Internet.Site" ViewStateMode="Disabled" %>

Nested master page:

<%@ Master Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Tvet.master.cs" Inherits="Internet.Tvet.Tvet" ViewStateMode="Enabled" %>

I can get ViewState working if I add ViewStateMode=”Enabled” to each control or a panel surrounding the controls, but my understanding is that all controls inherit the parent ViewStateMode setting.

Is this behaviour correct or am I doing something wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:07:42+00:00Added an answer on June 11, 2026 at 10:07 pm

    To fix it, simply change the ViewStateMode property of the ContentPlaceHolder control

    Example:

    In master page

    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" ViewStateMode="Enabled">
    
    </asp:ContentPlaceHolder>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on ASP.Net 2.0 website and I have a strange problem. First
I have a ASP.net MVC2 website that was working great when using Visual Studio
I am working on an ASP.Net website and have a GridView displaying some data,in
I have a website using ASP.NET MVC, everything was working fine, but I'd like
I'm working on asp.net website with Vb.net and I have a dropdownlist with autopostback
I have an asp.net website that stores events inside a database table. Then I
im working on an asp.net website with c#. I have a dropdownlist with data
I have a asp.net website in the umbraco cms, there I can use razor
I have created one ASP.net website. I have web hosting and have ftp access
I have an ASP.NET website (c# as code behind) in which one of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.