Quote Trouble with path variable

Discussion in 'ASP General' started by Scott, Jun 17, 2005.

  1. Scott

    Scott Guest

    I'm trying to concatenate a path of Application("WebSiteFullPath") which
    equals http://www.mywebsite.com/ and an image file like CODE below. My
    problem is the full path listing in RESULTS below adds an extra " quote and
    obviously breaks the path to the image. How can I script the quotes to not
    add the extra double quote between my website path variable and my image
    path?


    CODE:
    Response.Write "<img border=""0"" src=""" &
    Application("WebSiteFullPath") & """images/edit.gif"" width=""15""
    height=""15"">

    RESULTS
    <img border="0" src="http://www.mywebsite.com/"images/edit.gif" width="15"
    height="15">
     
    Scott, Jun 17, 2005
    #1
    1. Advertising

  2. Scott wrote:
    > I'm trying to concatenate a path of Application("WebSiteFullPath")
    > which equals http://www.mywebsite.com/ and an image file like CODE
    > below. My problem is the full path listing in RESULTS below adds an
    > extra " quote and obviously breaks the path to the image. How can I
    > script the quotes to not add the extra double quote between my
    > website path variable and my image path?
    >
    >
    > CODE:
    > Response.Write "<img border=""0"" src=""" &
    > Application("WebSiteFullPath") & """images/edit.gif"" width=""15""
    > height=""15"">
    >
    > RESULTS
    > <img border="0" src="http://www.mywebsite.com/"images/edit.gif"
    > width="15" height="15">


    It should be pretty simple to see where you have to eliminate the literal
    quotes from the string you are concatenating. However:

    Response.Write "<img border=""0"" src=""" &
    Application("WebSiteFullPath") & "images/edit.gif"" width=""15""
    height=""15"">

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jun 17, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    13,335
  2. Stimp
    Replies:
    2
    Views:
    2,294
    Stimp
    Sep 20, 2006
  3. Eric Layman
    Replies:
    3
    Views:
    644
    Rad [Visual C# MVP]
    Apr 14, 2007
  4. Replies:
    6
    Views:
    447
    Stefan Ram
    Jun 15, 2008
  5. Valery Khamenya
    Replies:
    3
    Views:
    730
Loading...

Share This Page