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. getting a string from the previous page

getting a string from the previous page

Scheduled Pinned Locked Moved ASP.NET
helpquestion
5 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.
  • L Offline
    L Offline
    laziale
    wrote on last edited by
    #1

    Hi! I am building a web site, and I stuck at one place(a place for beginners), I have a striing what is filled in one page, and then when the button is clicked, I want to get the string from the previous page and used in my current page, any solutions how I can do that. Thanks ahead

    S E D 3 Replies Last reply
    0
    • L laziale

      Hi! I am building a web site, and I stuck at one place(a place for beginners), I have a striing what is filled in one page, and then when the button is clicked, I want to get the string from the previous page and used in my current page, any solutions how I can do that. Thanks ahead

      S Offline
      S Offline
      Syed Ali Raza
      wrote on last edited by
      #2

      add that string in ViewState on previose page ViewState["string"]=string; and get it on new page string str= ViewState["string"].tostring(); but you can use it only for one page.

      D 1 Reply Last reply
      0
      • L laziale

        Hi! I am building a web site, and I stuck at one place(a place for beginners), I have a striing what is filled in one page, and then when the button is clicked, I want to get the string from the previous page and used in my current page, any solutions how I can do that. Thanks ahead

        E Offline
        E Offline
        eyeseetee
        wrote on last edited by
        #3

        string stringname = (Request.QueryString["variable"]); or just use sessions, that is a good way of transfering information from page to page so set a session in one page: Session["session1"] = stringname; then get the session if (Session["session1"] != null) { stringname= Session["session1"].ToString(); }

        1 Reply Last reply
        0
        • S Syed Ali Raza

          add that string in ViewState on previose page ViewState["string"]=string; and get it on new page string str= ViewState["string"].tostring(); but you can use it only for one page.

          D Offline
          D Offline
          Deepak Nigam
          wrote on last edited by
          #4

          My dear friend viewstate work on page level......

          Deepak Nigam

          1 Reply Last reply
          0
          • L laziale

            Hi! I am building a web site, and I stuck at one place(a place for beginners), I have a striing what is filled in one page, and then when the button is clicked, I want to get the string from the previous page and used in my current page, any solutions how I can do that. Thanks ahead

            D Offline
            D Offline
            Deepak Nigam
            wrote on last edited by
            #5

            you can use postbackurl also......

            Deepak Nigam

            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