【发布时间】:2008-11-14 13:20:55
【问题描述】:
这可以在没有 MVC 的情况下完成吗? 有没有一种简单的方法来抽象或封装导航逻辑?
我目前在我的代码背后有很多以下内容(我知道这可能不是最好的做法):
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"); }
}
【问题讨论】:
标签: asp.net architecture design-patterns