how to check tempdata is null or not in mvc code example
Example: if exist TempData[] c#
@if (TempData["SuccessMessage"] != null)
{
<div class="success-message">
@Html.Raw(@TempData["SuccessMessage"].ToString())
</div>
}
@if (TempData["SuccessMessage"] != null)
{
<div class="success-message">
@Html.Raw(@TempData["SuccessMessage"].ToString())
</div>
}