샌드위치를 편집하기위한 MVC보기가 있습니다. 샌드위치 이름, 가격 등.이 양식에는 고유 한 제출 단추가 있습니다. 양식을 제출하면 POST 편집 조치가 호출되고 샌드위치가 갱신되며보기가 다시로드됩니다.ASP.NET MVC보기의 여러 양식 및 라우팅 문제
그런 다음 동일한보기에서 샌드위치 편집 양식 아래에 재료 옆에 추가 버튼이있는 드롭 다운 목록이 있습니다. 다른 성분에 첨가물 첨가물 모양 포스트를 어떻게 만드십시오, 그러나 편집 전망을 다시 적재합니까?
RedirectToAction ("편집")은 많은 정크를 URL에 넣습니다. 여기
작동 내가 시도 하나의 방법이지만, URL에 쓰레기를두고 : 여기[AcceptVerbs(HttpVerbs.Post)]
public ActionResult LoginRemoveAssociation(FormCollection values)
{
int webUserKey = Int32.Parse(values["WebUserKey"]);
int associationKey = Int32.Parse(values["AssociationKey"]);
db.DeleteWebUserAssociation(webUserKey, associationKey);
return RedirectToAction("LoginEdit", new LoginEditViewModel(webUserKey, true));
}
가 RedirectToAction 후 URL에서 정크 :
https://localhost/mvc/Admin/Login/382?WebUser=Web.Data.Entities.WebUser&Associations=System.Data.Objects.ObjectQuery`1[Web.Data.Entities.Association]&WebUserAssociations=System.Data.Objects.DataClasses.EntityCollection`1[Web.Data.Entities.WebUserAssociation]&ManagementCompanies=System.Collections.Generic.List`1[Web.Data.Entities.ManagementCompany]&ManagementCompanyList=System.Web.Mvc.SelectList&AccessLevels=System.Collections.Generic.List`1[Web.Data.Entities.AccessLevel]&AccessLevelList=System.Web.Mvc.SelectList&PostMessage=Changes%20saved.
"RedirectToAction ("편집 ")은 많은 정크를 URL에 넣습니다."정크 "의 예를 게시 할 수 있습니까? – Chandu
포스트가 정크로 편집 됨 :) – Blackcoil