I have a HttpPost method which I call a submit to database add transcation. If success, I set my viewbag.result = "successfully added"
var response = UpdateDatabase(command);
if (response.success)
viewbag.result = "successfully added";
RedirectToActoin("SubmitApplication");
In the view,
if (!string.IsNullOrEmpty(@ViewBag.result))
{
<p> @ViewBag.result</p>
}
I placed a breakpoint and the viewbag.result is null.
I am not sure why the viewbag.result is null. Any help is appreciated. Thanks.