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. store user defined class objects in view state

store user defined class objects in view state

Scheduled Pinned Locked Moved ASP.NET
csharptutorial
4 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.
  • D Offline
    D Offline
    deepalititi
    wrote on last edited by
    #1

    i have class named address. i want to store address class object into view state using c#.net 2.0. please provide some code or explanation how to do it.

    V N 2 Replies Last reply
    0
    • D deepalititi

      i have class named address. i want to store address class object into view state using c#.net 2.0. please provide some code or explanation how to do it.

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

      deepalititi wrote:

      store user defined class objects in view state

      Oops! Remember ViewState is going to travel up and down in the hidden field called __VIEWSTATE and this is going to present your webpage significant delays in rendering.

      Vasudevan Deepak Kumar Personal Homepage Tech Gossips

      1 Reply Last reply
      0
      • D deepalititi

        i have class named address. i want to store address class object into view state using c#.net 2.0. please provide some code or explanation how to do it.

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        deepalititi wrote:

        i want to store address class object into view state using c#.net 2.0

        ViewState["key"] = Object Remember viewstate is stored as hidden field in the page. So each time page posts, this viewstate will also posted. This will increase HTML file size. It's not good to store large objects in viewstate. Is your address class object is serializable ?


        My Website | Ask smart questions

        D 1 Reply Last reply
        0
        • N N a v a n e e t h

          deepalititi wrote:

          i want to store address class object into view state using c#.net 2.0

          ViewState["key"] = Object Remember viewstate is stored as hidden field in the page. So each time page posts, this viewstate will also posted. This will increase HTML file size. It's not good to store large objects in viewstate. Is your address class object is serializable ?


          My Website | Ask smart questions

          D Offline
          D Offline
          deepalititi
          wrote on last edited by
          #4

          please provide me other solutions to store user defined class objects

          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