Is Response.Write() working with Razor?

2019-04-19 09:13发布

Is Response.Write() working with Razor?

I tried to use @Html.RenderAction but I'm getting the error:

CS1502: The best overloaded method match for 
'Microsoft.WebPages.WebPageUltimateBase.Write(Microsoft.WebPages.Helpers.HelperResult)'   
has some invalid arguments

1条回答
在下西门庆
2楼-- · 2019-04-19 09:43

This is the correct syntax:

@{Html.RenderAction("Index", "Menu");}

Or just using Action:

@Html.Action("Index", "Menu")
查看更多
登录 后发表回答