누구든지 .cshtml 레이아웃 파일을 구문 분석하고 webservice에서 문자열로 출력을 렌더링하는 방법을 알고 있습니까? 어떤 팁?ASP.NET MVC - 렌더링 및 출력 생각 webservice
ASP.NET C에서 # 이와 비슷한 내용 XhtmlTextWriter xhtmltextwriter = new XhtmlTextWriter (stringwriter);
// Create a new Page and add the control to it.
using (Page page = new Page())
{
foreach (Control item in controls)
{
page.Controls.Add(item);
}
HttpContext.Current.Server.Execute(page, xhtmltextwriter, false);
}
감사합니다, 짐
http://stackoverflow.com/questions/3628895/is-it-possible-to-use-razor-view-engine-outside-asp-net의 답변을 확인하십시오. –