Skip to main content

Double quotes in string

Comments

4 comments

  • Permanently deleted user

    Hi Michael

    Try using"

    "<a href=" + char(34) + FilePath + char(34) + " target=" + char(34) + "_blank" + char(34) + "> Property Easement </a>"

    Regards

    Ralph

    PS you may need to add to the Imports Microsoft.VisualBasic

     

    0
  • Permanently deleted user

    Ralph,

    Thank you for the help.

    I was able to get the expression I needed by splitting it up into 5 different variables and then combining them into a sixth variable. Not pretty, but it worked.

    I would prefer one string like you suggested. When I use the string you gave me, I get a compiler error:

    Compiler error encountered processing expression: '.' expected

    I did add Microsoft.VisualBasic to the Imports.

    Any thoughts?

    Thanks again for the response,

    Mike

    0
  • Permanently deleted user

    Hi Mike

    the Char should have been Chr

    Sorry about that.

    Regards

    Ralph

    0
  • Berend Veldkamp

    I always recommend using String.Format, which makes things a little easier to read. To use embedded quotes in the string, double them, or use single quotes:

    String.Format("<a href=""{0}"" target=""_blank"">Property Easement</a>", FilePath) 

    or

    String.Format("<a href='{0}' target='_blank'>Property Easement</a>", FilePath)

    0

Please sign in to leave a comment.