?
Solved

Including double quotes inside a String -- C# syntax

Posted on 2007-10-21
3
Medium Priority
?
584 Views
Last Modified: 2013-11-07
Hello Experts.

I'm new to C#. I am having difficulty using double quotation marks inside a String.  

I am creating an HTML email using message.Body and I would like to include a <a href>
ie.  
message.Body = "Here's my <a href="testlink.com">link</a>";

I'm getting an ( ; expected ) error around my double quotes inside the <a href> tag.understand why, but I'm having trouble finding the right syntax.  

How is this accomplished with C#?

Thanks.
0
Comment
Question by:soapygus
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
JimBrandley earned 2000 total points
ID: 20118748
You can do it this way:
message.Body = "Here's my <a href=\"testlink.com\">link</a>";

Jim
0
 

Author Comment

by:soapygus
ID: 20118757
Thanks Jim!
0
 
LVL 22

Expert Comment

by:JimBrandley
ID: 20118780
My pleasure. Good luck.

Jim
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question