RazorGenerator, Templates, and @Html

陌路散爱 提交于 2019-11-29 10:38:09

Just a thought, but why couldn't you set up other pages and in your Controller Code open up an HTTPWebRequest / WebClient send the data you need there, get all the html/text out of that view, merge several calls together and then email out all that string.

public ActionResult SomeAction() {
  // call other section logic using HttpWebRequest or WebClient
  // /controller/emailsection/{vars}/......
  // Get the string out of the request add it to ViewData["xxx"]
  // rinse and repeat for other sections

}

public ActionResult EmailSection() {
  //put section logic here

  Response.ContentType = "text/html"; // "text/plain"
  Response.Write("Some HttpWebResponse");
  return null;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!