No overload for method 'Write' takes 0 arguments in MVC3 Razor Format,

后端 未结 2 1122
情书的邮戳
情书的邮戳 2021-01-18 18:17

In My project <% if (Model.Folders != null){}%> is working fine,when i convert this code to razor format ,i got the exception \"No overload for method \'W

2条回答
  •  耶瑟儿~
    2021-01-18 18:58

    I have had the same problem, I solved it by wrapping my Html.RenderPartial as follows:

         
             @{
               Html.RenderPartial(ViewData["abc"] as string, Model);
              }
         
    

    or

    @{ Html.RenderPartial(ViewData["abc"] as string, Model); }

提交回复
热议问题