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. How can I pass Dataset from one page to another?

How can I pass Dataset from one page to another?

Scheduled Pinned Locked Moved ASP.NET
databasequestioncsharpasp-net
7 Posts 6 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.
  • M Offline
    M Offline
    MudkiSekhon
    wrote on last edited by
    #1

    I am developing an application in which one page is having DataGrid. I am showing limited columns in that datagrid. I want to show the details of that particular row on the next page after clicking the particular row in the datagrid. I don't want to go again to query the database to show the details of the row. Please tell me the method to pass Dataset or Datarow from one page to other in ASP.NET Thanks, Sandy Sekhon

    K T I G 4 Replies Last reply
    0
    • M MudkiSekhon

      I am developing an application in which one page is having DataGrid. I am showing limited columns in that datagrid. I want to show the details of that particular row on the next page after clicking the particular row in the datagrid. I don't want to go again to query the database to show the details of the row. Please tell me the method to pass Dataset or Datarow from one page to other in ASP.NET Thanks, Sandy Sekhon

      K Offline
      K Offline
      karthiBalu
      wrote on last edited by
      #2

      I have one idea better store that Datatable in the session as a table this may work :((

      1 Reply Last reply
      0
      • M MudkiSekhon

        I am developing an application in which one page is having DataGrid. I am showing limited columns in that datagrid. I want to show the details of that particular row on the next page after clicking the particular row in the datagrid. I don't want to go again to query the database to show the details of the row. Please tell me the method to pass Dataset or Datarow from one page to other in ASP.NET Thanks, Sandy Sekhon

        T Offline
        T Offline
        ToddHileHoffer
        wrote on last edited by
        #3

        You could store the datatable(s) in a session item. An even better option is two put the grids on the same webpage and store the data in viewstate. You can always hide one of the grids if you need to with javascript or with server code. "People who never make mistakes, never do anything." My Blog

        G 1 Reply Last reply
        0
        • T ToddHileHoffer

          You could store the datatable(s) in a session item. An even better option is two put the grids on the same webpage and store the data in viewstate. You can always hide one of the grids if you need to with javascript or with server code. "People who never make mistakes, never do anything." My Blog

          G Offline
          G Offline
          GhulamB
          wrote on last edited by
          #4

          i think storing table or data set in session variable is more reliable.

          T 1 Reply Last reply
          0
          • G GhulamB

            i think storing table or data set in session variable is more reliable.

            T Offline
            T Offline
            ToddHileHoffer
            wrote on last edited by
            #5

            Well, the thing with session items like that is that they can get all screwed up if the use clicks the back and foward buttons. Also, they take up more resources. I haven't had any issues with storing a datatable in viewstate, but perhaps there are issues I don't know of. "People who never make mistakes, never do anything." My Blog

            1 Reply Last reply
            0
            • M MudkiSekhon

              I am developing an application in which one page is having DataGrid. I am showing limited columns in that datagrid. I want to show the details of that particular row on the next page after clicking the particular row in the datagrid. I don't want to go again to query the database to show the details of the row. Please tell me the method to pass Dataset or Datarow from one page to other in ASP.NET Thanks, Sandy Sekhon

              I Offline
              I Offline
              Ista
              wrote on last edited by
              #6

              well you cant store a datatable within the session because it's not serializable. Oddly the DataSet is You can easily store it in the Session( DataSet ) and then retrieve at the next page. If its really small store in the viewstate. Otherwise keep it in the session. If you have problems of click back and forward you should implement the Momento design pattern 1 line of code equals many bugs. So don't write any!!

              1 Reply Last reply
              0
              • M MudkiSekhon

                I am developing an application in which one page is having DataGrid. I am showing limited columns in that datagrid. I want to show the details of that particular row on the next page after clicking the particular row in the datagrid. I don't want to go again to query the database to show the details of the row. Please tell me the method to pass Dataset or Datarow from one page to other in ASP.NET Thanks, Sandy Sekhon

                G Offline
                G Offline
                Gowtham Sen
                wrote on last edited by
                #7

                Hi, You can do this using session variables. After creating a dataset Session["dataset}]= dataset --------- while accessing DataSet ds = (DataSet)(Session["dataset"]); Thanks and Regards Gowtham Sen

                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