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
In Razor the if test should be like this:
@if (Model.Folders != null)
{
@Model.Folders
}
and the RenderPartial like this:
@{Html.RenderPartial(ViewData["abc"] as string, Model);}
or you could also use the Partial method which is equivalent and a little shorter:
@Html.Partial(ViewData["abc"] as string, Model)