Click here to Skip to main content
15,881,248 members
Articles / Web Development / HTML5

ComponentModel for ASP.NET MVC3

Rate me:
Please Sign up or sign in to vote.
4.80/5 (14 votes)
26 Jun 2011GPL311 min read 68.6K   2.5K   53  
In this article, I will show you how to build a component model for ASP.NET MVC3 with Builder and Factory design patterns. You could use this model to write your strongly type components to binding data, handling harchical objects and write jQuery UI controls / HTML5 controls for ASP.NET MVC3.
<!DOCTYPE html>
<html class="no-js">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/default/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/default/dna.ui.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.tmpl.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.farbtastic.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/djme2.min.js")" type="text/javascript"></script>
</head>
<body>
    <div class="page">
        <header>
            <div id="title">
                <h1>
                    DotNetAge hands on labs</h1>
            </div>
            <div id="logindisplay">
                Welcome <strong>@User.Identity.Name</strong>!
            </div>
            <nav>
                <ul id="menu">
                    <li>@Html.ActionLink("Html5 demo", "Index", "Home")</li>
                    <li>@Html.ActionLink("Template", "PanelDemo", "Home")</li>
                    <li>@Html.ActionLink("Composites", "Composites", "Home")</li>
                    <li>@Html.ActionLink("DJME2", "Preview", "Home")</li>
                    <li>@Html.ActionLink("About", "About", "Home")</li>
                </ul>
            </nav>
        </header>
        <section id="main">
            @RenderBody()
            <p>
                To learn more about our Components project for ASP.NET MVC (DJME2) visit <a href="http://www.dotnetage.com/sites/home/djme-2-demo.html"
                    title="DJME demo Website">http://www.dotnetage.com/sites/home/djme-2-demo.html</a>.
            </p>
        </section>
        <footer>
        </footer>
    </div>
</body>
</html>

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 GNU General Public License (GPLv3)


Written By
Architect DotNetAge
China China
In 1999, I started programming using Delphi, VB, VJ.From 2002 I started with .NET using C#.Since 2005 when i had became an EIP product manager I was focus on EIP and CMS technique. In 2008 i established dotnetage.com and started to shared my ideas and projects online. I believe "No shared no grow"

www.dotnetage.com

Comments and Discussions