I have following loc in one of my view pages:
@* Html.Partial("Form")*@
@{
var role = Convert.ToInt32(Session["Role"]);
if (role == 2)
{
Html.Partial("Form");
}
}
The Html.Partial("Form")
works fine when its outside any if statement and renders everything fine.
But when Inside an if
block it renders nothing, if statements is hit, it’s true, debugger eves reads the function and goes to the Form Partial view
and goes through every line in it but at the end there is not output on the page.
Kindly help