473,493 Members | 3,174 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

creating a true hyperlink href= in an email body dynamically

Hi,
I am creating emails dynamically using C# and would like to place a
hyperlink in the email body before sending it out. I added the text for what
I thought was a hyperlink but the email just shows the entire text including
the navigation URL where I would like it to show up as a clickable link but
only display the portion of the hyperlink that it is supposed to.
I am using microsoft Office 2007 and VS2005.
Thanks.
--
Paul G
Software engineer.
Aug 21 '08 #1
2 4663
Paul pretended :
Hi,
I am creating emails dynamically using C# and would like to place a
hyperlink in the email body before sending it out. I added the text for what
I thought was a hyperlink but the email just shows the entire text including
the navigation URL where I would like it to show up as a clickable link but
only display the portion of the hyperlink that it is supposed to.
I am using microsoft Office 2007 and VS2005.
Thanks.
What is the format of the mail body? If it is set to "text" (which is
the default) then html wouldn't work. You need to set the type to
"html" and provide an html text (which can include a <a href=...>)

Set System.Net.MailMessage.IsBodyHtml to true

Hans Kesting
Aug 22 '08 #2
Thanks for the response, I think the email mode is currently text, will try
to set it to html as suggested.
--
Paul G
Software engineer.
"Hans Kesting" wrote:
Paul pretended :
Hi,
I am creating emails dynamically using C# and would like to place a
hyperlink in the email body before sending it out. I added the text for what
I thought was a hyperlink but the email just shows the entire text including
the navigation URL where I would like it to show up as a clickable link but
only display the portion of the hyperlink that it is supposed to.
I am using microsoft Office 2007 and VS2005.
Thanks.

What is the format of the mail body? If it is set to "text" (which is
the default) then html wouldn't work. You need to set the type to
"html" and provide an html text (which can include a <a href=...>)

Set System.Net.MailMessage.IsBodyHtml to true

Hans Kesting
Aug 26 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2320
by: laura | last post by:
I am writing an intranet and want to be able to hyperlink to all files within a specific folder AND it's subfolders. Whilst I can hyperlink to the files in the specified folder AND I can also...
10
2547
by: Ian Kelly | last post by:
Hi All, Does anyone know how to execute a hyperlink programically? I need to create and send an email message, but I need to have the default mail editor loaded and populated with the message...
2
4983
by: SAL | last post by:
I would like to create a VB.net function, that builds a dynamic hyperlink using System.Web.UI.WebControls.HyperLink, but I can not find any examples on how to generate a dynamic hyperlink. Has...
3
1586
by: Garth Wells | last post by:
used the following "classic ASP" approach to build a dynamic menu, but would like to know the proper way to implement the same functionality using a .Net technique (e.g., placing the code in the...
7
10848
by: Beefminator | last post by:
Hello, How can you create a hyperlink in the HTML body of CDOsys email? Line 7 is a link for yahoo.com, but the asp page does not work. Set objMessage = CreateObject("CDO.Message")...
1
1623
by: virajitha | last post by:
Hi .... I am facing a major problem in writing a javascript that will load an xml document dynamically and posts it to the next page when clicked on a hyperlink. The problem is that in the...
1
6145
by: salad | last post by:
I can store in a a hyperlink like this ClickMe#http://www.test.com in Access ClickMe is the display text, http://www.test.com the address. Is it possible, using SendObject, to send this...
4
3420
by: mramsay | last post by:
Hi, I'm having a real problem creating a dynamic hyperlink for my website. I want to pull the field name from mysql table. Field name is description. I would like this to be a hyperlink on my...
1
6684
by: leenadiwan | last post by:
Hi All!! We want to create a hyperlink dynamically in an html table TD. We have tried the following and evenon some internet sites the code examples are samilar but the adding to the td part is...
0
7119
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6989
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7195
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7367
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4889
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1400
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
285
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.