asp.net mvc - Jquery .append() & Html.Helper -
is there way put html.helper inside .append() function.
success: function (html) { $("#resultaatsgebied").append(' <li>@html.textboxfor(item => model.rg1)<ul id="concretisering" class="sublist"><li>@html.textboxfor(item => model.rg1sub1)</li></ul>@html.actionlink("+", "index", null, new { id = "addconcretisering" })</li>'); }
this works, string, not control
edit:
this works now, actionlink generated not. have same actionlink default in view, , there works. generated one, think not execute ajax call?
if code in razor view, can put brackets razor code :
success: function (html) { $("#resultaatsgebied").append(' <li>@(html.textboxfor(item => model.rg1))<ul id="concretisering" class="sublist"><li>@(html.textboxfor(item => model.rg1sub1))</li></ul>@(html.actionlink("+", "index", null, new { id = "addconcretisering" }))</li>'); }
Comments
Post a Comment