다음과 같은 코드가 있습니다.C#에서 RedirectToAction이 비쌉니까?
메모를 만들 예정이지만 CustomerId를 알면 두 개의 URL이 있습니다. 나는 방화범의 성능을 볼 때
public ActionResult CreateByCustomer(int id)
{
Session["ncAppointmentId"] = 0;
Session["ncNoteDate"] = null;
SetConsultant(0);
return RedirectToAction("Create", "Note", new { id = id });
}
public ActionResult Create(int id = 0)
{
int _CustomerId = id == 0 ? Convert.ToInt32(Session["CustomerId"]) : id;
Session["TemplateIds"] = null;
and so on.......
ViewBag.CustomerId = _CustomerId;
는 RedirectToAction 1 초의 지연까지 초래할 수있는 '302 찾을'상태로 GET됩니다. 내가
return Create(0);
그런 다음 GET이 발생하지 않고 성능이 향상됩니다
에 RedirectToAction 라인을 변경하는 경우.
하지만 단점이나 내가 놓친 부분에 대한 의견을 찾고 있습니까?
감사 - 당신, 내 생각의 가치 확인. Re : jQueryUI - 간단한 편집에서는 유용하지만 IFrame을 사용하면 프로세스 분리 및 재사용 성이 향상됩니다. –