This project is read-only.

Razor.Parse(template, model); is not working

Dec 26, 2015 at 9:36 AM
Below code is not working
I have created HtmlTemplateBase class and model class with name, email and copy paste the below i am getting error. error CS1061: 'System.Web.Mvc.HtmlHelper<MvcApplication5.Controllers.PageModel>' does not contain a definition for 'TextBoxFor' and no extension method 'TextBoxFor' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<MvcApplication5.Controllers.PageModel>' could be found (are you missing a using directive or an assembly reference?)}

please help me


string template =
    <title>Hello @Model.Name</title>
    Email: @Html.TextBoxFor(m => m.Email)
var model = new PageModel { Name = "World", Email = "" };
string result = Razor.Parse(template, model);