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
  1. Home
  2. Web Development
  3. ASP.NET
  4. _VIEWSTATE is toooooo big

_VIEWSTATE is toooooo big

Scheduled Pinned Locked Moved ASP.NET
htmlsysadminquestion
6 Posts 4 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.
  • D Offline
    D Offline
    Daniel Kirstenpfad
    wrote on last edited by
    #1

    HiHo okay... i got a dynamic generated Page... and there is the VieState hidden Field in the HTML Source passed to the user... okay okay..its needed - but is there a way to shrink the size of this viewstate without loosing features...maybe cacheing it on the server itself ? mfG. Daniel Kirstenpfad

    S 1 Reply Last reply
    0
    • D Daniel Kirstenpfad

      HiHo okay... i got a dynamic generated Page... and there is the VieState hidden Field in the HTML Source passed to the user... okay okay..its needed - but is there a way to shrink the size of this viewstate without loosing features...maybe cacheing it on the server itself ? mfG. Daniel Kirstenpfad

      S Offline
      S Offline
      Sumeet Rattan
      wrote on last edited by
      #2

      "View" is what your client gets to see... So view state information has to go to client weather you maintain it on server, in a cookie or some remote machine... Consider the following: - use plain html controls as far as possible e.g: If you dont want to enable/disable or hide/show a button then use instead of - If you must you asp controls then try setting viewstate property of controls to false (wherever possible) Happy Programming -- Sumeet

      V D 2 Replies Last reply
      0
      • S Sumeet Rattan

        "View" is what your client gets to see... So view state information has to go to client weather you maintain it on server, in a cookie or some remote machine... Consider the following: - use plain html controls as far as possible e.g: If you dont want to enable/disable or hide/show a button then use instead of - If you must you asp controls then try setting viewstate property of controls to false (wherever possible) Happy Programming -- Sumeet

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        Hi Sumeet, I have also observed this. My screens have multiple tables and for showing different screens like first editable screen and next confirm screen, I do a jugglery like hiding the second table first, showing the first one and reverse in the confirmation screen. Perhaps this comes handy so that you need not manually prefill values if the user goes somewhere and comes back. Perhaps if the number of controls in any of the tables in some of the screens exceed, the ViewState value exceeds too much. Once I copied the ViewState value, and checked how much it contained. It was 25.4K Could you suggest some optimal ways of using ViewState, without it getting swollen like this. Deepak Kumar Vasudevan http://deepak.portland.co.uk/

        S 1 Reply Last reply
        0
        • V Vasudevan Deepak Kumar

          Hi Sumeet, I have also observed this. My screens have multiple tables and for showing different screens like first editable screen and next confirm screen, I do a jugglery like hiding the second table first, showing the first one and reverse in the confirmation screen. Perhaps this comes handy so that you need not manually prefill values if the user goes somewhere and comes back. Perhaps if the number of controls in any of the tables in some of the screens exceed, the ViewState value exceeds too much. Once I copied the ViewState value, and checked how much it contained. It was 25.4K Could you suggest some optimal ways of using ViewState, without it getting swollen like this. Deepak Kumar Vasudevan http://deepak.portland.co.uk/

          S Offline
          S Offline
          Sumeet Rattan
          wrote on last edited by
          #4

          Hello Deepak, I think your problem is somewhat different. Can you elaborate more... otherwise.. Consider using template fields in such cases. Make your design simpler using template data holders. Regards Sumeet Happy Programming -- Sumeet

          1 Reply Last reply
          0
          • S Sumeet Rattan

            "View" is what your client gets to see... So view state information has to go to client weather you maintain it on server, in a cookie or some remote machine... Consider the following: - use plain html controls as far as possible e.g: If you dont want to enable/disable or hide/show a button then use instead of - If you must you asp controls then try setting viewstate property of controls to false (wherever possible) Happy Programming -- Sumeet

            D Offline
            D Offline
            Daniel Kirstenpfad
            wrote on last edited by
            #5

            Well; i fixed my problem by using sessionstate Stuff... but there another problem just poped-off.... iam saving the very big datatable i´m displaying into the sessiondata Object. Okay.. iam restoreing it... but it seems that the sessionstate object does not make any difference between users. In fact every user opening my WebForm just gets the datatable of the last user.... does anybody know how to treat this problem ? mfG. Daniel Kirstenpfad

            V 1 Reply Last reply
            0
            • D Daniel Kirstenpfad

              Well; i fixed my problem by using sessionstate Stuff... but there another problem just poped-off.... iam saving the very big datatable i´m displaying into the sessiondata Object. Okay.. iam restoreing it... but it seems that the sessionstate object does not make any difference between users. In fact every user opening my WebForm just gets the datatable of the last user.... does anybody know how to treat this problem ? mfG. Daniel Kirstenpfad

              V Offline
              V Offline
              vishal S
              wrote on last edited by
              #6

              session should maintain the different data for different user. you are doing some logical error in putting the data in session give detail of your problem statement hi

              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