Does anyone knows the way to parse .cshtml layout file and render output as string in webservice? Any tips ?
In ASP.NET C# something like this 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);
}
Thanks, Jim