Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
 
Add your own
alternative version

Presentation Model and Dependency Injection

, 26 Apr 2009 Ms-PL
ASP.NET MVVM provides a framework to implement the Presentation Model pattern, a.k.a. the Model-View-ViewModel pattern in ASP.NET projects. Developers can take advantages of Dependency Injection and Event Broker to write concise, elegant and business focused code.
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Demo.WebApp._Default" Codebehind="Default.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h3>Welcome to the ASP.NET MVVM Demo Site</h3>
    Here you will see three options to implement customer management using the ASP.NET MVVM.

<br />
<br />
<a href="Customer1.aspx">Option 1. List Page and Popup Detail Page</a>

This is to display customer list with hyperlink on each row. When clicked the hyperlink, a new popup window shows up with customer details in it.

 
<br />
<br />
<a href="Customer2.aspx">Option 2. List Page and Switch to Detail Page</a>

While the first option is a commonly used pattern in many earlier web applications, more recent web application shows the details in the same window to avoid popup. E.g. SharePoint Service is doing this.
 


<br />
<br />
<a href="Customer3.aspx">Option 3. List Page and Embedded Detail Page</a>

Similar to Option 2, there won’t be popup, further more this option dose not hide the list while showing the details.  It shows the list and details together.<br />
&nbsp;
</asp:Content>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

Share

About the Author

Yiyi Sun
Architect
Canada Canada
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150326.1 | Last Updated 26 Apr 2009
Article Copyright 2009 by Yiyi Sun
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid