I'm building my own simple jQuery popup for my application. I applied the jQuery script to be fired when the model is not null but it keeps firing errors everytime it starts up finding that the model object is has no reference at all. How do we properly check if the model is not null without applying a reference object set bool = true in every controller
TempData is used for passing notification messages to another controller and then using a ViewModel to pass to a ViewBag.
@model ViewModel @if(Model.Notify.ShowMessage == true) // ERROR HERE. { // jQuery Script comes here. <div class="PopupMsgHolder"></div> }

Go to the complete details ...