我目前正在努力提供我们拥有的信息监督员服务,我的任务是简单地将信息细节纳入信息机构。
I have tried using a string builder for this however i have found that my message body is a html based string.
我很想知道,是否有办法可以添加价值观,在这种“html”的某个时候添加?
Below is a section of the html string i want to manipulate. My text needs to be inserted directly after the body tag.
<body lang=EN-GB link=blue vlink=purple>
<div class=WordSection1>
<p class=MsoNormal>
<span style= font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:black >Another test for AppendLine();<o:p></o:p>
</span>
</p>
在这方面,我是如何试图做到的:
StringBuilder sb = new StringBuilder();
sb.Append("From: ");
sb.Append(message.From.ToString());
sb.AppendLine();
sb.Append("Sent: ");
sb.Append(message.Date.ToString());
sb.AppendLine();
sb.Append("To: ");
sb.Append(message.To.ToString());
sb.AppendLine();
sb.Append("Subject: ");
sb.Append(message.Subject);
sb.AppendLine();
sb.Append(message.BodyHtml);
Unfortunately this just printed my From, Sent, To, Subject values onto one line and then output the html section.
If any more information is needed please let me know and i will provide it.