Wenn Viewbag null ist
@if (ViewBag.YourKey== null)
{
//your code
}
Mahmoud Nasr
@if (ViewBag.YourKey== null)
{
//your code
}