From controller, I'm returning a value using ViewBag to razor page. Based on the value of ViewBag, I have displayed some partial views like this:
@if (ViewBag.CourseName == "Physics")
{
<partial name="_ExpPhysicsPartial"/>
}
@if (ViewBag.CourseName == "Chemistry")
{
<partial name="_ExpChemistryPartial"/>
}
Is this a kind of deprecated technique somehow in terms of security purpose?