Answers for "how to check tempdata is null or not in mvc"

C#
0

if exist TempData

@if (TempData["SuccessMessage"] != null)
{
    <div class="success-message">
        @Html.Raw(@TempData["SuccessMessage"].ToString())
    </div>
}
Posted by: Guest on January-01-1970

Code answers related to "how to check tempdata is null or not in mvc"

C# Answers by Framework

Browse Popular Code Answers by Language