从数据网格视图打开Outlook的超链接电子邮件列单击事件 [英] hyperlink to open Outlook from datagrid view Email column click event

查看:84
本文介绍了从数据网格视图打开Outlook的超链接电子邮件列单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过单击c#

推荐答案

中的特定电子邮件列从datagrid视图打开utlook。您需要将列呈现为超链接。一种技术是在SQL查询中连接超链接HTML(数据来自数据库)。你没有说出你的数据来自哪里,所以我将给出一个SQL示例。



SELECT'< a href =mailto:'+ [电子邮件] +'>'+ [电子邮件] +'< / a>'

来自MyTable

在此示例中,[Email]将是名称包含电子邮件地址的字段。
You need to render the column as a hyperlink. One technique is to concatenate the hyperlink HTML in a SQL query (where the data is coming from a database). You don't say where your data is coming from, so I'll give an SQL example.

SELECT '<a href="mailto:' + [Email] + '">' + [Email] + '</a>'
FROM MyTable
In this example "[Email]" would be the name of the field containing the email address.


这篇关于从数据网格视图打开Outlook的超链接电子邮件列单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆