Click to See Complete Forum and Search --> : HTML BodyFormat


jonah_taxt
August 31st, 2004, 12:52 PM
Hi... it's me again.

I used html body format for my mail message. But when I try to create a hyperlink within the text (eg. <a href="\\server\folder"</a>) Visual Studio tells me that the name server and name folder are not declared. How do I insert HTML tags into the body of my message?

Thanx for any replies

MRutledge
September 1st, 2004, 07:31 PM
your saying when you do this:

MyMail.BodyFormat = MailFormat.Html;


You get an error? Or are you saying when you put a link in the body string like this:


string sBody = "Please <a href=\"http://www.mysite.com\">click here</a>.";


You get an error?

jonah_taxt
September 2nd, 2004, 10:30 AM
Nope, what I mean is that, when I try to put the link:

Body as string = "<html><body>To continue <a href="http://website/index.html"> Click Here </a>."

The compiler takes http://website/index.html as an object and not as a hyperlink. The compiler tells me that the object http://website/index.html is not declared.

Thanx for your reply Rutledge :wave:

MRutledge
September 2nd, 2004, 10:51 AM
Try this:


Body as string = "<html><body>To continue <a href=""http://website/index.html""> Click Here </a>."