我正在致力於MVC
。目前我的情況是,當我從bootstrap模式彈出保存數據時,它完美保存。當我第二次打開它時,以前保存的值顯示在模式彈出窗口中。在引導程序中調用的模型在第二次打開時充滿了以前的值。如何從隱藏模式中刪除自舉模式的數據
保存數據後模式關閉時有什麼方法可以清除它。所以,當我再次打開它會加載新的數據。
下面是操作方法
[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.");
}
只是清除表單 - '$( '形式')得到(0).reset段();' –