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

  • SEARCH
  • Home
  • 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 7690431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:23:42+00:00 2026-05-31T20:23:42+00:00

I have a massive viewstate hidden field that is causing my application to be

  • 0

I have a massive viewstate hidden field that is causing my application to be unworkable. I have tried:

  • EnableViewState="false" on every control
  • EnableViewState="false" in page directive
  • Page.EnableViewState = false in Page_Init
  • <pages enableViewState="false" /> in web.config

The page causing the issue has a single GridView which I want to render once only, so I don’t ever need the viewstate.

I examined the hidden field using this tool, and there is apparently hardly any info in it (since I disabled the property in every control probably). For some reason though, the page insists on including a hidden field that is thousands and thousands of lines long.

How can I get rid of this field (or reduce it to a usable size) for good?


Here is an exert from the offending GridView:

<asp:GridView ID="MyGrid" runat="server" AutoGenerateColumns="False" 
      EnableModelValidation="True" EnableViewState="False" 
      CssClass="my-report">
      <Columns>
          <asp:TemplateField>
              <HeaderTemplate>
                <span title='title' class="abbr">My ID</span>
              </HeaderTemplate>
              <ItemTemplate>
                <%# Eval("my_id") %>
              </ItemTemplate>
          </asp:TemplateField>
          <asp:TemplateField>
              <HeaderTemplate>
                <span title='title2' class="abbr">Second col heading</span>
              </HeaderTemplate>
              <ItemTemplate>
                  <asp:ListView ID="MyListView" runat="server" EnableViewState="False">
                     <LayoutTemplate>
                        <ul>
                            <asp:PlaceHolder runat="server" ID="itemPlaceHolder" EnableViewState="False" />
                        </ul>
                     </LayoutTemplate>
                     <ItemTemplate>
                            <li><%# Eval("field_2")%></li>
                     </ItemTemplate>
                   </asp:ListView>
              </ItemTemplate>
          </asp:TemplateField>
      </Columns>
  </asp:GridView>
  • 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-05-31T20:23:43+00:00Added an answer on May 31, 2026 at 8:23 pm

    In case anyone has a similar problem, it was occuring because I had a ListView inside each row of the grid. I replaced the ListView with a Repeater and the viewstate is no longer a problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a massive problem: I have a WPF application that makes a WcF
I am importing massive amounts of data from Excel that have various table layouts.
I have a massive amount of repeating code that I wish to replace in
I have a massive multidimensional array that has been serialised by PHP. It has
I have a massive amount of input data (that's why I use Hadoop) and
I have massive html code, with loooads of images, problem is, every single image
I have this massive nested loop scenario that is calling the DB and making
We have a massive client facing web application here. We recently re-wrote the buy
I have a massive, unfamiliar Java codebase that I need to use in one
Let's say we have a massive CSS file that is used to style the

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.