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. QueryString

QueryString

Scheduled Pinned Locked Moved ASP.NET
3 Posts 3 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.
  • A Offline
    A Offline
    AS 13
    wrote on last edited by
    #1

    Can anyone give me sample of code using QuerString (e.g passing ang retriving value)

    A key to every Solution

    P T 2 Replies Last reply
    0
    • A AS 13

      Can anyone give me sample of code using QuerString (e.g passing ang retriving value)

      A key to every Solution

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      URL: www.somewhere.com/test.aspx?name=bob

      Code:

      string theName;

      theName = Request.Querystring("name");

      Response.Write(theName); // Will output bob to the screen

      1 Reply Last reply
      0
      • A AS 13

        Can anyone give me sample of code using QuerString (e.g passing ang retriving value)

        A key to every Solution

        T Offline
        T Offline
        Thats Aragon
        wrote on last edited by
        #3

        Hi, you can set multiple QueryString string tempURL = "~/MySite.com/Welcome.aspx?Name=" +MyName+ "&Surname="+MySurname; Now on Welcome.aspx page you can get this both values like this. if(Request.QueryString.Count>0) { if(Request.QueryString["Name"].ToString()!=null) { Name= Request.QueryString["Name"]; } if(Request.QueryString["MySurname"].ToString()!=null) { MySurname = Request.QueryString["MySurname"]; } } Regards...

        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