I try to display the Razor html Partial view based on the ViewBag condition, but always get addition errors.
@{
if (ViewBag.Auth)
{
@Html.RenderPartial("_ShowUserInfo")
}
}
I also tried ...
@if (ViewBag.Auth)
{
@Html.RenderPartial("_ShowUserInfo")
}
Error message:
Compiler Error Message: CS1502: The best overloaded method match for
'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)'
has some invalid arguments
source
share