本文介绍了窗口服务发送电子邮件通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个Windows服务来发送警报,但是我需要以表格格式显示报告.有人可以建议如何做吗?

I have created a windows service that sends alerts but i need to present the report in tabular format.can anyone suggest how to do this ?

推荐答案

public class HTMLTableToString
    {
        public static String Convert(Table table)
        {
            StringWriter stringWriter = new StringWriter();
            using (HtmlTextWriter writer = new HtmlTextWriter(stringWriter))
            {
                table.RenderControl(writer);
            }
            return stringWriter.ToString();
        }
    }


这篇关于窗口服务发送电子邮件通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 08:48