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

Viewstate

Scheduled Pinned Locked Moved ASP.NET
performancequestion
5 Posts 2 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.
  • A Offline
    A Offline
    azam316
    wrote on last edited by
    #1

    hi, my question is that can i store a dataset in the viewstate of the aspx page> i know that it is possible but will it effect the performance. keep in mind that the servers are pretty good and powerful, but the record count can be in thousands; more than 20 to 30 thousands. thanx in advance ☺«««DTA»»»☺

    M 1 Reply Last reply
    0
    • A azam316

      hi, my question is that can i store a dataset in the viewstate of the aspx page> i know that it is possible but will it effect the performance. keep in mind that the servers are pretty good and powerful, but the record count can be in thousands; more than 20 to 30 thousands. thanx in advance ☺«««DTA»»»☺

      M Offline
      M Offline
      matthias s 0
      wrote on last edited by
      #2

      azam316 wrote: but will it effect the performance It surely will. ViewState is simply serialized, encrypted (if ViewStateMAC is enabled) data and send to the client. I would not recommend to store a dataset in the viewstate. In fact, in the project I'm working currently on (huge amounts of data here), we're trying to design our code in a way, that there is little or no need for anything being stored in the ViewState. I've read somewhere (but forgot the source) that the ViewState should be kept smaller than 1K if possible. Just my opinion though. /matthias

      I love deadlines. I like the whooshing sound they make as they fly by.
      [Douglas Adams]

      A 1 Reply Last reply
      0
      • M matthias s 0

        azam316 wrote: but will it effect the performance It surely will. ViewState is simply serialized, encrypted (if ViewStateMAC is enabled) data and send to the client. I would not recommend to store a dataset in the viewstate. In fact, in the project I'm working currently on (huge amounts of data here), we're trying to design our code in a way, that there is little or no need for anything being stored in the ViewState. I've read somewhere (but forgot the source) that the ViewState should be kept smaller than 1K if possible. Just my opinion though. /matthias

        I love deadlines. I like the whooshing sound they make as they fly by.
        [Douglas Adams]

        A Offline
        A Offline
        azam316
        wrote on last edited by
        #3

        thanx for your opinion matthias. you made a very interesting point that the ViewState should be kept smaller than 1K if possible. I would like to know that how do i determine the current size of the ViewSate for my page? thanx in advance! ☺«««DTA»»»☺

        M 1 Reply Last reply
        0
        • A azam316

          thanx for your opinion matthias. you made a very interesting point that the ViewState should be kept smaller than 1K if possible. I would like to know that how do i determine the current size of the ViewSate for my page? thanx in advance! ☺«««DTA»»»☺

          M Offline
          M Offline
          matthias s 0
          wrote on last edited by
          #4

          The most obvious idea that comes to mind is to enable tracing in your ASPX page, by setting the Trace="true" directive at the top of your aspx file. This will give you detailed information about the sizes of your ViewState. hth. /matthias

          I love deadlines. I like the whooshing sound they make as they fly by.
          [Douglas Adams]

          A 1 Reply Last reply
          0
          • M matthias s 0

            The most obvious idea that comes to mind is to enable tracing in your ASPX page, by setting the Trace="true" directive at the top of your aspx file. This will give you detailed information about the sizes of your ViewState. hth. /matthias

            I love deadlines. I like the whooshing sound they make as they fly by.
            [Douglas Adams]

            A Offline
            A Offline
            azam316
            wrote on last edited by
            #5

            thanx 4 all your opinions, matthias Regards ☺«««DTA»»»☺

            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