0
의견을 게시하는 작업입니다. 어떤 이유로 코멘트가 두 번 게시됩니다. 중단 점을 넣으면이 동작의 맨 아래에 도달하면 다시 처음으로 돌아갑니다. 나는 이유를 알 수 없다? 여기 이 작업이 두 번 실행되는 이유는 무엇입니까?
[HttpPost]
public ActionResult postComment(string comment, string userId, string workerid)
{
CleanerManager cm = new CleanerManager("Cleaning_LadyConnectionString");
CommentsOnUser c = new CommentsOnUser();
c.Comment = comment;
c.CleanerId = int.Parse(workerid);
c.UserId = int.Parse(userId);
c.Date = DateTime.Today;
cm.AddCommentOnUser(c);
return this.RedirectToAction
("Profile", new { id = workerid });
}
뷰
<button type="button" data-workerid="@Model.Cleaner.id" data-userid="@Model.User.id" class="btn btn-default postComment" data-dismiss="modal">Post Comment</button>
아마 당신의보기에 뭔가있을거야. – itsme86
제 생각에 문제는 View 또는 일부 스크립트에 있습니다. – Jhonathan
은에 의견을 게시하는 사용자입니까? 클라이언트 측 이벤트 중복으로 인한 것일 수 있습니다. –
dlatikay