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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Set Method of Querystring property

Set Method of Querystring property

Scheduled Pinned Locked Moved Visual Basic
3 Posts 2 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
    MyThread
    wrote on last edited by
    #1

    Hi All, I am trying to use the set method of querystring property to change a value that I passed as parameter e.g. Request.QueryString.Set("test", "Yes") I want to assign "Yes" to "test". And "test" is passed from previous page as querystring. Can anyone tell me how I can this working. Thanks!

    L 1 Reply Last reply
    0
    • M MyThread

      Hi All, I am trying to use the set method of querystring property to change a value that I passed as parameter e.g. Request.QueryString.Set("test", "Yes") I want to assign "Yes" to "test". And "test" is passed from previous page as querystring. Can anyone tell me how I can this working. Thanks!

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

      Hi, The Request.QueryString property returns a read-only System.Collections.NameValueCollection object. You won't be able to modify it no matter how hard you try. You will need to copy that collection over to a new NameValueCollection in order to modify it. It's a shame that the HttpRequest.QueryString documentation doesn't mention that it is read-only, but a quick look with Reflector confirms it.

      M 1 Reply Last reply
      0
      • L Lost User

        Hi, The Request.QueryString property returns a read-only System.Collections.NameValueCollection object. You won't be able to modify it no matter how hard you try. You will need to copy that collection over to a new NameValueCollection in order to modify it. It's a shame that the HttpRequest.QueryString documentation doesn't mention that it is read-only, but a quick look with Reflector confirms it.

        M Offline
        M Offline
        MyThread
        wrote on last edited by
        #3

        Thanks a lot. I found out about that after doing some research...

        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