我的 aspx 页面有一个证书图像,我可以在其中输入名称主题和等级。我想将此 aspx 页面作为邮件正文以 jpeg 格式发送。因此,当邮件收件人收到邮件时,他应该能够查看证书并下载它。请帮忙。
这是我的 aspx 页面
<body id="bdy">
<div style="background-image: url('http://localhost:5520/Images/certi3.jpg'); background-repeat: no-repeat; background-position: center center; background-color: #FFFFFF; border: medium solid #000000; z-index: 1; top: 64px; position: absolute; height: 474px; width: 674px; left: 177px">
<form id="form1" runat="server">
<asp:TextBox id="TextBox1" runat="server" forecolor="#99CCFF" text="Name" style="z-index: 1; left: 171px; top: 228px; position: absolute; width: 330px"></asp:TextBox>
<asp:TextBox id="TextBox2" runat="server" text="Date" style="z-index: 1; top: 282px; position: absolute; width: 148px; left: 361px; height: 17px"></asp:TextBox>
<asp:TextBox id="TextBox3" runat="server" style="z-index: 1; left: 130px; top: 372px; position: absolute; width: 420px"></asp:TextBox>
<asp:TextBox id="TextBox4" runat="server" style="z-index: 1; left: 227px; top: 282px; position: absolute; width: 62px; height: 17px"></asp:TextBox>
<asp:button id="Button1" runat="server" style="z-index: 1; left: 251px; top: 488px; position: absolute; height: 26px" text="Save and Send " onclick="Button1_Click" />
<asp:table id="Table1" runat="server" style="z-index: 1; top: 2px; position: absolute; height: 474px; width: 674px; left: 1px">
</asp:table>
</form>
</div>
</body>
编辑1:获得aspx页面的html布局后,如何使用预先生成的html发送和发送电子邮件?
以下是我的代码:
protected void Button1_Click(object sender, System.EventArgs e)
{
WebClient myClient = new WebClient();
string myPageHTML = null;
byte[] requestHTML;
string currentPageUrl = Request.Url.ToString();
UTF8Encoding utf8 = new UTF8Encoding();
requestHTML = myClient.DownloadData(type the url);
myPageHTML = utf8.GetString(requestHTML);
Response.Write(myPageHTML);
SendMail();
}