MVC 없이도이 작업을 수행 할 수 있습니까? 탐색 논리를 추상화하거나 캡슐화하는 쉬운 방법이 있습니까?ASP.NET의 탐색 로직을 코딩하는 가장 좋은 방법은 무엇입니까
나는 현재 내 코드 비하인드에서 다음 중 꽤 많이 (그리고 나는 아마 일을 할 수있는 최선의 일이 아니다 알고) :
protected void btnNext_Click(object sender, EventArgs e)
{
...
if (condition1)
{ Response.Redirect("~/NextPage.aspx"); }
else if (condition2)
{ Response.Redirect("~/AnotherPage.aspx"); }
else
{ Response.Redirect("~/GoBackToOldKentRoad.aspx"); }
}