在我的应用程序中,我总是最终实现一个模型 - 视图 - 演示者模式,并通常最终从屏幕上用get属性报废我的视图对象。 例如 Person IBasicRegistration.Person
{
get
{
if (ViewState["View.Person"] == null)
ViewState["View.Person"] = new Person();
我一直在探索ASP.NET的MVP模式,但在页面上使用数据绑定控件时,我无法保持演示者中的所有表示逻辑。 下面的场景和类只是举例,我正在处理的真实案例更复杂。任何想法或方向将不胜感激。 假设我有一个页面显示有关客户的信息,包括姓名和地址。它还使用Repeater控件呈现订单列表。 public class CustomerDto {
public string Name { get; s
我有一个ASP.NET页面实现我的视图,并在页面构造函数中创建演示者。 Phil Haack's post providing was used as the starting point,我只是通过帖子中的例子来说明问题。 public partial class _Default : System.Web.UI.Page, IPostEditView {
PostEditContr