3
내 aspx 페이지에는 인증서 제목이 있습니다. 여기에서 이름과 제목을 입력 할 수 있습니다. 나는이 aspx 페이지를 jpeg 형식의 메일 본문으로 보내려고합니다. 따라서 메일 수신자는 메일을 수신하면 인증서를보고 다운로드 할 수 있어야합니다. 도와주세요. 미리 생성 된 HTML로, 영문 페이지의 HTML 레이아웃을받은 후, 어떻게 보낼 수 및 이메일 : 여기 aspx 페이지를 jpeg로 저장하고 C로 이메일로 보내십시오.
내 영문<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>
편집 한 페이지입니다?
다음은 내 코드입니다 :
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();
}
일반적으로 이러한 상황은 pdf 작성으로 해결됩니다. 이 작업에 사용할 수있는 도구가 많이 있습니다. 이미지, 데이터가 포함 된 pdf 파일을 만들 수 있습니다. –
나는 HTML 형식으로 aspx를 얻으려고했다. 이제 전자 메일을 통해 첨부 파일이나 메일 본문으로 보내고 싶다. 여기에 코드가 있습니다. 해결책을 좀 도와주세요. 나는 전에이 일을하지 않았다. – user1665707
여기서 코드 보호 보이드를 Page_Load (객체 송신자는 EventArgs E) { } 보호 보이드를 Button1_Click (개체 송신자 경우 System.EventArgs E) { { 웹 클라이언트하여 MyClient = 새로운 웹 클라이언트 (인); string myPageHTML = null; byte [] requestHTML; string currentPageUrl = Request.Url.ToString(); UTF8Encoding utf8 = 새 UTF8Encoding(); requestHTML = myClient.DownloadData (url 입력); myPageHTML = utf8.GetString (requestHTML); Response.Write (myPageHTML); SendMail(); } – user1665707