I am working on MVC
. Currently my scenario is that when I save data from bootstrap modal popup it saves perfectly. When I open it for the second time, the values previously saved shows up in the modal popup. The model called in the bootstrap is filled with previous values when opened for the second time.
Is there any way to clear it when the modal closes after saving the data. So that when I opens again it would load the fresh data.
Below is the code for the action method
[HttpPost]
public ActionResult Savenfo(int Id, string comment, byte Status, string Code, string Rev, string Email, string Phone)
{
var form = objForm.Get(Id);
if (form != null)
{
if (CurrentUserTicket.Dval!= form.DId)
return new UnauthorizedActionResult();
form.Comment = comment;
form.Status = Status;
form.Code = Code;
form.Email= Email;
form.Phone= Phone;
form.Rev = Rev;
objForm.Update(form);
return new AjaxActionResponse(true, "Information has been saved.");
}
return new AjaxActionResponse(false, "The specified Information does not exist.");
}