用JavaScript添加asp.net代码(html助手)

时间:2015-10-22 15:31:30

标签: javascript jquery html asp.net asp.net-ajax

我对asp.net中的javascript和html助手有疑问,我可以使用javascript来填充带有html助手的div吗?像这样:

   $('#example').append("@using (Html.BeginForm('Create,'Company', FormMethod.Post)"+)
                         "{"+
                                  "@Html.TextBox('Name',new {@class = 'input-class'})"+
                         "}");

我知道填充在div中附加一个普通的html表单

$('#example').append("<form action = '/Company/Create' method = 'Post'>"+
                           "<input type = 'text' class = 'input-class'/>"+
                     "</form>")

但我不知道是否可以使用html助手

0 个答案:

没有答案