Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Disable Viewstate on all Controls but still be able to Enable

Disable Viewstate on all Controls but still be able to Enable

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Skoder
    wrote on last edited by
    #1

    Hey... simple question, which is the best way to disable the viewstate on all controls, soo i only have to define which one should be enabled ? I guess if i put enableviewstate="false" in the top directive .. I will not be able to turn any controls on again ? Soo should i then just put the enableviewstate="false" in the tag ? or tag ? Martin :confused:

    S M 2 Replies Last reply
    0
    • S Skoder

      Hey... simple question, which is the best way to disable the viewstate on all controls, soo i only have to define which one should be enabled ? I guess if i put enableviewstate="false" in the top directive .. I will not be able to turn any controls on again ? Soo should i then just put the enableviewstate="false" in the tag ? or tag ? Martin :confused:

      S Offline
      S Offline
      SABhatti
      wrote on last edited by
      #2

      in tag -----

      1 Reply Last reply
      0
      • S Skoder

        Hey... simple question, which is the best way to disable the viewstate on all controls, soo i only have to define which one should be enabled ? I guess if i put enableviewstate="false" in the top directive .. I will not be able to turn any controls on again ? Soo should i then just put the enableviewstate="false" in the tag ? or tag ? Martin :confused:

        M Offline
        M Offline
        minhpc_bk
        wrote on last edited by
        #3

        Hi Martin, AFAIK, in the web page you either disable the ViewState of the entire web page by setting the EnableViewState="false" in the Page directive or you do that on a per-control basis. I guess that you here might want to simply disable the ViewState of the container and also want to enable the ViewState of a specific child control. Unfortunately, when you set the EnableViewState of the container to false, the ViewState data of all child controls will not be persisted even their EnableViewState properties are set to true. So if you want to keep the ViewState of a child control enabled, you might need to make sure that the ViewState of its container is enabled also.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups