开发者

ASP.net hyperlink in email

I'm pulling a hyperlink from a SQL db and trying to embed it in an ema开发者_运维知识库il programmatically as follows:

        Dim dv As System.Data.DataView = CType(SqlDataSource2.Select(DataSourceSelectArguments.Empty), System.Data.DataView)
        ''Add Ticket URL and comments to answers dictionary
        Dim emailMessage As New MailMessage("donotreply@myemail.com", "me@myemail.com")
        emailMessage.Body = dv.Item(0).Item(1).ToString <--Location of email

Example of data being pulled from db:

<a href=http://www.google.com>My email link</a>

I'm trying to get it to show up as a hyper link an email, but instead it displays the full html as above. I've tried HTMLDecode, but that doesn't seem to do anything. Any suggestions?


EDIT: Try emailMessage.isBodyHTML property

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜