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 to pass values from 1 page to another..

how to pass values from 1 page to another..

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
12 Posts 10 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 SumitChandra

    how to pass drop down list and text box values from page1.aspx to page2.aspx?:confused:

    Sumit Chandra

    P Offline
    P Offline
    paulalvin
    wrote on last edited by
    #3

    For example in page1.aspx

    string id = "121";
    Session["QueryString"] = id;
    Response.Redirect("admin_home.aspx");

    to get data in page2.aspx perWorkId = Convert.ToString(Session["QueryString"]); hope it helps :)

    S 1 Reply Last reply
    0
    • P paulalvin

      For example in page1.aspx

      string id = "121";
      Session["QueryString"] = id;
      Response.Redirect("admin_home.aspx");

      to get data in page2.aspx perWorkId = Convert.ToString(Session["QueryString"]); hope it helps :)

      S Offline
      S Offline
      SumitChandra
      wrote on last edited by
      #4

      thanks for replying paulalvin .... what is 121.. it can be anyting?

      R T 2 Replies Last reply
      0
      • S SumitChandra

        thanks for replying paulalvin .... what is 121.. it can be anyting?

        R Offline
        R Offline
        R Giskard Reventlov
        wrote on last edited by
        #5

        Seriously? That's your question? :laugh:

        "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

        1 Reply Last reply
        0
        • S SumitChandra

          how to pass drop down list and text box values from page1.aspx to page2.aspx?:confused:

          Sumit Chandra

          K Offline
          K Offline
          k ran
          wrote on last edited by
          #6

          use session...

          B 1 Reply Last reply
          0
          • S SumitChandra

            thanks for replying paulalvin .... what is 121.. it can be anyting?

            T Offline
            T Offline
            thoiness
            wrote on last edited by
            #7

            Maybe you are asking "can it be any type?" The answer would be "yes." A session variable can hold any type, but be careful, as holding large classes, etc, in session variables can be devastating to scalability.

            1 Reply Last reply
            0
            • S SumitChandra

              how to pass drop down list and text box values from page1.aspx to page2.aspx?:confused:

              Sumit Chandra

              T Offline
              T Offline
              thatraja
              wrote on last edited by
              #8

              You may use**

              • Query Strings
              • Cookies
              • Session variables
              • Server.Transfer
              • Post Back URL

              **Passing data/parameters/values from one aspx page to another aspx page[^] Passing Values from One Page to Another Page – ASP.NET[^]

              thatraja

              FREE Code Conversion VB6 ASP VB.NET C# ASP.NET C++ JAVA PHP DELPHI ColdFusion
              HTML Marquee & its alternatives

              Nobody remains a virgin, Life screws everyone :sigh:

              1 Reply Last reply
              0
              • K k ran

                use session...

                B Offline
                B Offline
                basurajkumbhar
                wrote on last edited by
                #9

                Hi :-O you have to use the "Query String" to send data one page to another.

                R 1 Reply Last reply
                0
                • S SumitChandra

                  how to pass drop down list and text box values from page1.aspx to page2.aspx?:confused:

                  Sumit Chandra

                  B Offline
                  B Offline
                  bishu_Visu
                  wrote on last edited by
                  #10

                  You can use session/query string to pass values from one page to another. query string Response.Redirect("Home.aspx?value="'+ddl.SelectedItem.Value+'"); on another page you can receive string temps=Request.QueryString["value"]; Session Session["TempToStore"]=ddl.SelectedItem.Value; Or In case of large data you can use XML Manipulation to write or Read. There is another way to create dataset and store it into session http://stackoverflow.com/questions/2288299/storing-and-retrieving-datatable-from-session

                  1 Reply Last reply
                  0
                  • B basurajkumbhar

                    Hi :-O you have to use the "Query String" to send data one page to another.

                    R Offline
                    R Offline
                    RichardGrimmer
                    wrote on last edited by
                    #11

                    Cobblers

                    C# has already designed away most of the tedium of C++.

                    1 Reply Last reply
                    0
                    • S SumitChandra

                      how to pass drop down list and text box values from page1.aspx to page2.aspx?:confused:

                      Sumit Chandra

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #12

                      you can pass it by using query string

                      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