Url and querystring reading

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David C

    Url and querystring reading

    I have an asp.net page that sends a querystring to a new web page (see full
    url below). The querystring takes a filename as one of the parameters. The
    problem I am having is when the filename contains a "&" then when I read the
    querystring it doesn't read past the embedded "&". Any way around this?
    Thanks.
    David

    http://server/Fileroom/frmSubfolder..../No%20File%20#)

    The value in the sname querystring is "Quarles & Brady (Misc./No File #)"


  • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

    #2
    RE: Url and querystring reading

    all querystring args are supposed to be urlencoded. see:

    HttpUtility.Url Encode


    -- bruce (sqlwork.com)


    "David C" wrote:
    I have an asp.net page that sends a querystring to a new web page (see full
    url below). The querystring takes a filename as one of the parameters. The
    problem I am having is when the filename contains a "&" then when I read the
    querystring it doesn't read past the embedded "&". Any way around this?
    Thanks.
    David
    >
    http://server/Fileroom/frmSubfolder..../No%20File%20#)
    >
    The value in the sname querystring is "Quarles & Brady (Misc./No File #)"
    >
    >
    >

    Comment

    • David Wier

      #3
      Re: Url and querystring reading

      Check out this article concerning URLEncode:


      David Wier

      http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
      bloated markup


      "David C" <dlchase@lifeti meinc.comwrote in message
      news:eaZVbjolIH A.1184@TK2MSFTN GP04.phx.gbl...
      >I have an asp.net page that sends a querystring to a new web page (see full
      >url below). The querystring takes a filename as one of the parameters.
      >The problem I am having is when the filename contains a "&" then when I
      >read the querystring it doesn't read past the embedded "&". Any way around
      >this? Thanks.
      David
      >
      http://server/Fileroom/frmSubfolder..../No%20File%20#)
      >
      The value in the sname querystring is "Quarles & Brady (Misc./No File #)"
      >
      >

      Comment

      • PopeDarren@gmail.com

        #4
        Re: Url and querystring reading

        Sweet. Thanks Bruce!

        Comment

        • David C

          #5
          Re: Url and querystring reading

          Thank you all. I knew there had to be a simple solution.
          David
          "David C" <dlchase@lifeti meinc.comwrote in message
          news:eaZVbjolIH A.1184@TK2MSFTN GP04.phx.gbl...
          >I have an asp.net page that sends a querystring to a new web page (see full
          >url below). The querystring takes a filename as one of the parameters.
          >The problem I am having is when the filename contains a "&" then when I
          >read the querystring it doesn't read past the embedded "&". Any way around
          >this? Thanks.
          David
          >
          http://server/Fileroom/frmSubfolder..../No%20File%20#)
          >
          The value in the sname querystring is "Quarles & Brady (Misc./No File #)"
          >
          >

          Comment

          Working...