Click here to Skip to main content
15,893,401 members
Articles / Web Development / ASP.NET

MVC Patterns (Active and Passive Model) and its implementation using ASP.NET Web forms

Rate me:
Please Sign up or sign in to vote.
4.88/5 (24 votes)
29 Oct 2013CPOL4 min read 63.5K   495   38  
MVC Pattern and it's types and implementation using Passive Model.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ComputerView.ascx.cs" Inherits="MVCPassiveModelForWinForms.Views.ComputerView" %>
<div style="height:30px; background-color:black; color:white; margin-bottom:10px;">
    <asp:Label ID="label1" runat="server" Text="Computer Accessories" style="display:block; text-align:center;"></asp:Label>
</div>

<table style="padding:10px 0px;float:left; width:365px;">
    <tr>
        <td style="font-weight:bold;">Monitor:</td>
        <td><asp:TextBox ID="txtMonitor" runat="server"></asp:TextBox></td>
        <td>Pieces</td>
    </tr>
    <tr>
        <td style="font-weight:bold;">Fan:</td>
        <td><asp:TextBox ID="txtFan" runat="server"></asp:TextBox></td>
        <td>Pieces</td>
    </tr>
    <tr>
        <td style="font-weight:bold;">Motherboard:</td>
        <td><asp:TextBox ID="txtMotherboard" runat="server"></asp:TextBox></td>
        <td>Pieces</td>
    </tr>
    <tr>
        <td>
            <asp:Button ID="btnUpdate" runat="server" Text="Add New" OnClick="btnUpdate_Click" />
        </td>
        <td></td>
        <td></td>
    </tr>
</table>

<span style="font-weight:bold; color:black; margin-bottom:10px; display:block;">Present Stock:</span>
<div style="font-size:14px;">
    <table>
        <tr>
            <td>Monitor:</td>
            <td><asp:Label ID="lblMonitor" runat="server"></asp:Label></td>
            <td>Pieces</td>
        </tr>
        <tr>
            <td>Fan:</td>
            <td><asp:Label ID="lblFan" runat="server"></asp:Label></td>
            <td>Pieces</td>
        </tr>
        <tr>
            <td>Motherboard:</td>
            <td><asp:Label ID="lblMotherboard" runat="server"></asp:Label></td>
            <td>Pieces</td>
        </tr>
    </table>
</div>

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 Code Project Open License (CPOL)


Written By
Founder http://softwarelandmarks.com/
Bangladesh Bangladesh
I am in Software Development for more than 12 years. I am expert on Microsoft Platform for Web Forms, MVC, MVC Core, Web API, Desktop App, PHP etc. I am also expert on jQuery, AngularJS, Bootstrap, Font Awesome, Telerik UI, Kendo UI etc. I know BackboneJS, KnockoutJS also. I am an article writer. I have many articles in CodeProject.

Email: khademulbasher@gmail.com

Comments and Discussions