转换Web表单到剃刀没有任何错误

时间:2014-04-02 11:47:33

标签: asp.net ajax asp.net-mvc asp.net-mvc-4 razor

我正在尝试转换为剃刀但显示错误

<%
    AjaxOptions options = new AjaxOptions();
    options.HttpMethod = "POST";
%>

@AjaxOptions options = new AjaxOptions();
    options.HttpMethod = "POST";

1 个答案:

答案 0 :(得分:4)

@{ 
    AjaxOptions options = new AjaxOptions();
    options.HttpMethod = "POST";
}