By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,458 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,458 IT Pros & Developers. It's quick & easy.

How do you place a string within a string? Please help

P: n/a
I'm creating a HTML email using VB Script in asp.net. I am an amatuer
programmer and require help with placing a string within a string:

I would like my mail to generate a link to a specified page. The <a
href> tag requires quotation marks and asp.net doesnt like this
because it thinks that the variable string is coming to a close. I
have tried using single quotations and also pipes but have had no joy.
If you can help I would be most grateful.

Dim strHTMLBody As String

strHTMLBody =
"<HTML><HEAD><TITLE>Review</TITLE></HEAD><BODY>You have been asked to
comment on a new document. Please follow the link below and click on
the COMMENT button to register your review<br><br><br><br> <a
href="www.evertonfc.com">Dave</A><br>Any questions or problems, email
ad***********@eDMS.com</BODY><HTML>"
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
one way is to use single quotes (') instead of double quotes (") in your
href link.

eg: <a href='page.html'>link</a>

"David Tomlinson" <da**********@hotmail.com> wrote in message
news:a5*************************@posting.google.co m...
I'm creating a HTML email using VB Script in asp.net. I am an amatuer
programmer and require help with placing a string within a string:

I would like my mail to generate a link to a specified page. The <a
href> tag requires quotation marks and asp.net doesnt like this
because it thinks that the variable string is coming to a close. I
have tried using single quotations and also pipes but have had no joy.
If you can help I would be most grateful.

Dim strHTMLBody As String

strHTMLBody =
"<HTML><HEAD><TITLE>Review</TITLE></HEAD><BODY>You have been asked to
comment on a new document. Please follow the link below and click on
the COMMENT button to register your review<br><br><br><br> <a
href="www.evertonfc.com">Dave</A><br>Any questions or problems, email
ad***********@eDMS.com</BODY><HTML>"

Nov 18 '05 #2

P: n/a
Thank you, that works fine. It also worked using no quotations as well.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

P: n/a
yes , but it wont work without quotes if you have spaces in your attribute
value.
"David Tomlinson" <da**********@hotmail.com> wrote in message
news:ed**************@TK2MSFTNGP12.phx.gbl...
Thank you, that works fine. It also worked using no quotations as well.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.