【发布时间】:2016-05-27 23:44:24
【问题描述】:
我想做的是这样的: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_iframe_target
但是将在 iframe 上发送的 html 将是 msg 文件的 HTMLBody。
我尝试过的:
<html>
<body>
<div id="myDiv">
<label>sample</label>
<button>send</button>
</div>
<div id="2ndHTML">
(Insert html codes without replacing the above tags)
</div>
</body>
</html>
默认.aspx.cs:
MailItem item = (MailItem)app.CreateItemFromTemplate(@"C:\Users\elayronj\Desktop\Sample\sample.msg", Type.Missing);
samplediv.InnerHtml = item.HTMLBody;
【问题讨论】:
-
为什么不在那里输入呢?您是否尝试以编程方式执行此操作?如果可以,您可以显示代码吗?
-
@JohnPaul - 标记为非建设性的。
-
@YacoubMassad 请参阅 default.aspx.cs 的代码。谢谢。
-
您能否更改模板以在您要插入新 HTML 的位置包含一些值(例如 GUID)?