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. variable passing by URL

variable passing by URL

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorialquestion
4 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.
  • J Offline
    J Offline
    jwoodall01
    wrote on last edited by
    #1

    I need to pass a variable from one page to the next using the URL. Example: I have selected JJJJJ from a drop-down menu and I click Send, which sends an email to a user saying to go to a certain website and that website that is linked to in the email needs a string variable to be assigned JJJJJ. Kind of like this forum being linked to by ?forumid=12076 I am using Visual Web Developer Express with ASP.NET and a codefile in VB. Any help is appreciated.

    M H 2 Replies Last reply
    0
    • J jwoodall01

      I need to pass a variable from one page to the next using the URL. Example: I have selected JJJJJ from a drop-down menu and I click Send, which sends an email to a user saying to go to a certain website and that website that is linked to in the email needs a string variable to be assigned JJJJJ. Kind of like this forum being linked to by ?forumid=12076 I am using Visual Web Developer Express with ASP.NET and a codefile in VB. Any help is appreciated.

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, I guess you can do that, what you might need to do is to append the variable value to the URL of the target page, then redirect the user to the new page. In the target page, you can read the value from the QueryString property of the Request object. You can read more about passing values between pages in MSDN: How to: Pass Values Between ASP.NET Web Pages [^]

      G 1 Reply Last reply
      0
      • J jwoodall01

        I need to pass a variable from one page to the next using the URL. Example: I have selected JJJJJ from a drop-down menu and I click Send, which sends an email to a user saying to go to a certain website and that website that is linked to in the email needs a string variable to be assigned JJJJJ. Kind of like this forum being linked to by ?forumid=12076 I am using Visual Web Developer Express with ASP.NET and a codefile in VB. Any help is appreciated.

        H Offline
        H Offline
        HimaBindu Vejella
        wrote on last edited by
        #3

        U can do that by dim id =Request.QueryString("forumid") id gets the value of 12026 "Aim to go where U have never been B4 and Strive to achieve it" http://groups.yahoo.com/subscribe/dotnetforfreshers http://himabinduvejella.blogspot.com

        1 Reply Last reply
        0
        • M minhpc_bk

          Hi there, I guess you can do that, what you might need to do is to append the variable value to the URL of the target page, then redirect the user to the new page. In the target page, you can read the value from the QueryString property of the Request object. You can read more about passing values between pages in MSDN: How to: Pass Values Between ASP.NET Web Pages [^]

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

          hi, when you redirecting to a page, just add the query string with the url as follows. Response.Redirect("yourRedirectedForm.aspx?url=linktoform.aspx"); Then at the page YourRedirectedForm.aspx access the querystring as follows. string url = Request.QeryString["url}]; Response.Redirect(url); In this way you can do this. 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