<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>ASP.NET</title>
        <link>http://geekswithblogs.net/dotNETvinz/category/11368.aspx</link>
        <description>ASP.NET</description>
        <language>en-US</language>
        <copyright>Vincent Maverick Durano</copyright>
        <managingEditor>vmsdurano@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>ProudMonkey Controls for ASP.NET 4.0 - Version 3</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/12/28/proudmonkey-controls-for-asp.net-4.0---version-3.aspx</link>
            <description>&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;First of all I am so happy to know that many developers around the world uses my controls (~ it's really a big surprise to me. =} ). Thank you all and hope you'll continue to provide feedback or feature suggestions so that I can work on it on my free time&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;.      &lt;br /&gt;      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;I've seen a lot of developers asking me via email, forums, blog comments, and private messages requesting how to use those controls in ASP.NET 4.0 with the latest release of AjaxControlToolkit. As you may know the previous dll of ProudMonkey controls will not work with the latest  version AjaxControlToolkit dll (&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;v4.1.51116.0)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;. So if you want to use the MessageBox, ConfirmBox and FrameBox controls in ASP.NET 4.0 with the latest ACT version then you can download the compatible version &lt;a target="_blank" href="https://proudmonkey.opendrive.com/files?M180ODM1MTdfdHRSeHI"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/a&gt;:       &lt;br /&gt;      &lt;br /&gt;If you want to customize the look and feel of the controls then be sure to check this post: &lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2011/05/02/proudmonkey-controls-for-asp.net-4.0---customizing-the-modal.aspx"&gt;ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal&lt;/a&gt;       &lt;br /&gt;      &lt;br /&gt;&lt;b&gt;Related Downloads:&lt;/b&gt;       &lt;br /&gt;      &lt;br /&gt;For ASP.NET 4.0 with ACT v4.1.51116.0 (Download &lt;a target="_blank" href="https://proudmonkey.opendrive.com/files?M180ODM1MTdfdHRSeHI"&gt;here&lt;/a&gt;)       &lt;br /&gt;For ASP.NET 4.0 with ACT v4.1.40412.0 (Download &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="../../images/geekswithblogs_net/dotNETvinz/ProudMonkeyControls4.0.zip"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;here&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;)      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;For ASP.NET 3.5 with ACT v&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;3.0.1106.0&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; (Download &lt;/span&gt;&lt;/span&gt;&lt;a href="../Tags/ProudMonkey%20Controls/default.aspx"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;here&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;/span&gt;)   &lt;br /&gt;  &lt;br /&gt;&lt;font face="Tahoma" size="2"&gt;&lt;b&gt;How to use it?&lt;/b&gt; Check this post: &lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2010/11/02/a-customize-messagebox-confirmbox-and-framebox-control-for-asp.net.aspx"&gt;Using the Controls&lt;/a&gt;&lt;/font&gt;   &lt;br /&gt;&lt;font face="Tahoma" size="2"&gt;   &lt;br /&gt;    &lt;br /&gt;Enjoy! =}&lt;/font&gt;   &lt;br /&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4443fa60-a511-40ac-8b93-80737d921655" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ProudMonkey+Controls" rel="tag"&gt;ProudMonkey Controls&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/148159.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/12/28/proudmonkey-controls-for-asp.net-4.0---version-3.aspx</guid>
            <pubDate>Wed, 28 Dec 2011 12:27:19 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/148159.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/12/28/proudmonkey-controls-for-asp.net-4.0---version-3.aspx#feedback</comments>
            <slash:comments>12</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/148159.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/148159.aspx</trackback:ping>
        </item>
        <item>
            <title>Masterpage, User Control, Modal Popup and Update Panel - Passing values to parent page.</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/09/02/masterpage-user-control-modal-popup-and-update-panel---passing.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;A developer is asking how to pass data from a UserControl control to the main page. Basically, the scenario is that he has a user control which contains a GridView and wrap arround within asp Ajax UpdatePanel control. The UserControl will then be used at the page that is hosted within a master page. The page contains some TextBox in which it will be populated once the user selects a row from the GridView also on that page the Modalpop is defined.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;To achieve that, here's one solution I've provided to the developer.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;The Page markup:&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;div style="width: 600px; overflow: auto"&gt;   &lt;p&gt;     &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;    &lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Modal.aspx.cs" Inherits="WebAppDemo.Modal" %&amp;gt;&lt;/span&gt;

&lt;span class="asp"&gt;&amp;lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%@ Register src="UserControl/WebUserControl1.ascx" tagname="WebUserControl1" tagprefix="uc1" %&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Content1"&lt;/span&gt; &lt;span class="attr"&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class="kwrd"&gt;="HeadContent"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;style&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/css"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        .modal-bg{
            background-color:Gray;
            filter:alpha(opacity=50);
            opacity:0.6;
            z-index:999;
        }
        .modal{
            position:absolute;
        }
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Content2"&lt;/span&gt; &lt;span class="attr"&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class="kwrd"&gt;="MainContent"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ToolkitScriptManager&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="ToolkitScriptManager1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:ToolkitScriptManager&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtProductName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtPrice"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;


    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:LinkButton&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="LinkButton1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Show"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="pnlPopUp"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;="display:none"&lt;/span&gt; &lt;span class="attr"&gt;CssClass&lt;/span&gt;&lt;span class="kwrd"&gt;="modal"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;uc1:WebUserControl1&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="WebUserControl11"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ModalPopupExtender&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="ModalPopupExtender1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;TargetControlID&lt;/span&gt;&lt;span class="kwrd"&gt;="LinkButton1"&lt;/span&gt; &lt;span class="attr"&gt;PopupControlID&lt;/span&gt;&lt;span class="kwrd"&gt;="pnlPopUp"&lt;/span&gt; &lt;span class="attr"&gt;BackgroundCssClass&lt;/span&gt;&lt;span class="kwrd"&gt;="modal-bg"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:ModalPopupExtender&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;As you can see, there really no fancy about the markup above. It just contains two TextBox, ModalPopup, and UserControl within the panel and a LinkButton as the target control for the Modal. 
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;UserControl markup:&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;p&gt;
    &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

  &lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="WebAppDemo.UserControl.WebUserControl1" %&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:UpdatePanel&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="UpdatePanel1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ContentTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:GridView&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;AutoGenerateColumns&lt;/span&gt;&lt;span class="kwrd"&gt;="False"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Columns&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:BoundField&lt;/span&gt; &lt;span class="attr"&gt;DataField&lt;/span&gt;&lt;span class="kwrd"&gt;="ID"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:BoundField&lt;/span&gt; &lt;span class="attr"&gt;DataField&lt;/span&gt;&lt;span class="kwrd"&gt;="ProductName"&lt;/span&gt; &lt;span class="attr"&gt;HeaderText&lt;/span&gt;&lt;span class="kwrd"&gt;="Product Name"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtPrice"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;lt;%# Eval("Price") %&amp;gt;'&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                         &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtAmount"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;lt;%# Eval("Amount") %&amp;gt;'&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                         &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Button1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Select"&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;="Button1_Click"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                         &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Columns&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:GridView&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ContentTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:PostBackTrigger&lt;/span&gt; &lt;span class="attr"&gt;ControlID&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView1"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:UpdatePanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CODE BEHIND:&lt;/strong&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;p&gt;
    &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Data;
&lt;span class="kwrd"&gt;using&lt;/span&gt; AjaxControlToolkit;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WebAppDemo.UserControl
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; WebUserControl1 : System.Web.UI.UserControl
    {

        &lt;span class="kwrd"&gt;private&lt;/span&gt; DataTable GetSampleData()
        {

            &lt;span class="rem"&gt;//NOTE: THIS IS JUST FOR DEMO&lt;/span&gt;
            &lt;span class="rem"&gt;//If you are working with database&lt;/span&gt;
            &lt;span class="rem"&gt;//You can query your actual data and fill it to the DataTable&lt;/span&gt;
            DataTable dt = &lt;span class="kwrd"&gt;new&lt;/span&gt; DataTable();
            DataRow dr = &lt;span class="kwrd"&gt;null&lt;/span&gt;;

            &lt;span class="rem"&gt;//Create DataTable columns&lt;/span&gt;
            dt.Columns.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; DataColumn(&lt;span class="str"&gt;"ID"&lt;/span&gt;, &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt;)));
            dt.Columns.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; DataColumn(&lt;span class="str"&gt;"ProductName"&lt;/span&gt;, &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt;)));
            dt.Columns.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; DataColumn(&lt;span class="str"&gt;"Price"&lt;/span&gt;, &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt;)));
            dt.Columns.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; DataColumn(&lt;span class="str"&gt;"Amount"&lt;/span&gt;, &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt;)));


            &lt;span class="rem"&gt;//Create Row for each columns&lt;/span&gt;
            dr = dt.NewRow();
            dr[&lt;span class="str"&gt;"ID"&lt;/span&gt;] = 1;
            dr[&lt;span class="str"&gt;"ProductName"&lt;/span&gt;] = &lt;span class="str"&gt;"Galaxy S"&lt;/span&gt;;
            dr[&lt;span class="str"&gt;"Price"&lt;/span&gt;] = &lt;span class="str"&gt;"100"&lt;/span&gt;;
            dr[&lt;span class="str"&gt;"Amount"&lt;/span&gt;] = &lt;span class="str"&gt;"10"&lt;/span&gt;;

            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr[&lt;span class="str"&gt;"ID"&lt;/span&gt;] = 2;
            dr[&lt;span class="str"&gt;"ProductName"&lt;/span&gt;] = &lt;span class="str"&gt;"iPhone 4"&lt;/span&gt;;
            dr[&lt;span class="str"&gt;"Price"&lt;/span&gt;] = &lt;span class="str"&gt;"200"&lt;/span&gt;;
            dr[&lt;span class="str"&gt;"Amount"&lt;/span&gt;] = &lt;span class="str"&gt;"2"&lt;/span&gt;;

            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr[&lt;span class="str"&gt;"ID"&lt;/span&gt;] = 3;
            dr[&lt;span class="str"&gt;"ProductName"&lt;/span&gt;] = &lt;span class="str"&gt;"HTC Mobile"&lt;/span&gt;;
            dr[&lt;span class="str"&gt;"Price"&lt;/span&gt;] = &lt;span class="str"&gt;"50"&lt;/span&gt;;
            dr[&lt;span class="str"&gt;"Amount"&lt;/span&gt;] = &lt;span class="str"&gt;"10"&lt;/span&gt;;

            dt.Rows.Add(dr);
            &lt;span class="kwrd"&gt;return&lt;/span&gt; dt;
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; BindGrid(DataTable source)
        {
            GridView1.DataSource = source;
            GridView1.DataBind();
        }
        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Page_Load(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (!IsPostBack)
                BindGrid(GetSampleData());
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Button1_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
        {
            Button b = (Button)sender;
            GridViewRow gvRow = (GridViewRow)b.NamingContainer;

            &lt;span class="kwrd"&gt;string&lt;/span&gt; productName = gvRow.Cells[1].Text;
            &lt;span class="kwrd"&gt;string&lt;/span&gt; price = ((System.Web.UI.WebControls.TextBox)gvRow.FindControl(&lt;span class="str"&gt;"txtPrice"&lt;/span&gt;)).Text;

            Type thePage = Page.GetType();
            System.Reflection.PropertyInfo[] pi = thePage.GetProperties();
            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (System.Reflection.PropertyInfo pinfo &lt;span class="kwrd"&gt;in&lt;/span&gt; pi)
            {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (pinfo.Name == &lt;span class="str"&gt;"ProductName"&lt;/span&gt;)
                {
                    pinfo.SetValue(Page, productName, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
                }
                &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (pinfo.Name == &lt;span class="str"&gt;"Price"&lt;/span&gt;)
                {
                    pinfo.SetValue(Page, price, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
                }
            }

            ((ModalPopupExtender)&lt;span class="kwrd"&gt;this&lt;/span&gt;.Parent.Parent.FindControl(&lt;span class="str"&gt;"ModalPopupExtender1"&lt;/span&gt;)).Hide(); 
            
        }
    }
}&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;As you can see at the Button.Click event I have used reflection to get the reference to the control from the main page and the set the needed values that I need to pass in the main page. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Running the page will display something like this: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;On initial load: 
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/pv1.jpg" width="413" height="194" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;After clicking the "show" link 
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/pv2.jpg" width="419" height="371" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;After selecting the second row in the gridview&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/pv3.jpg" width="430" height="196" /&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;That's it! I hope someone find this post useful!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/146744.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/09/02/masterpage-user-control-modal-popup-and-update-panel---passing.aspx</guid>
            <pubDate>Fri, 02 Sep 2011 12:57:25 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/146744.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/09/02/masterpage-user-control-modal-popup-and-update-panel---passing.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/146744.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/146744.aspx</trackback:ping>
        </item>
        <item>
            <title>Product Review - ComponentOne Studio for MVC Wijmo</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/08/22/product-review---componentone-studio-for-mvc-wijmo.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Wijmo is an awesome tool from ComponentOne. The goal of this tool is to help us web developers rapidly develop MVC applications with interfaces richer than WebForms.        &lt;br /&gt;        &lt;br /&gt;&lt;strong&gt;Main Features:&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;1.Over 30 UI Widgets with everything from interactive menus to rich charts.         &lt;br /&gt;2.MVC scaffolding automation. This means that Wijmo generates rich interactive Views and Controllers for your entire Model.         &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Free Trial DownLoad: &lt;a href="http://www.componentone.com/SuperProducts/StudioMVCWijmo/"&gt;http://www.componentone.com/SuperProducts/StudioMVCWijmo/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;In this review we'll take a look at Wijmo HTML Widgets and enhanced scaffolding feature.        &lt;br /&gt;        &lt;br /&gt;&lt;span style="color: rgb(0,0,128)"&gt;&lt;strong&gt;PART 1: Looking at UI Widgets&lt;/strong&gt;&lt;/span&gt;         &lt;br /&gt;        &lt;br /&gt;&lt;strong&gt;STEP 1: &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Fire up Visual Studio 2010 and Select -&amp;gt; New Project. Under Installed Templates -&amp;gt; Visual C#, select ASP.NET MVC 3 Wijmo Application        &lt;br /&gt;        &lt;br /&gt;Name the project as you like but in this demo I'm going to name it as "MVC3Wijmo".         &lt;br /&gt;        &lt;br /&gt;Now click OK to generate the default files for you. See below screen shot for a better look.         &lt;br /&gt;        &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij1.jpg" width="207" height="281" /&gt;         &lt;br /&gt;        &lt;br /&gt;        &lt;br /&gt;Since we are using the optimized ASP.NET MVC 3 Wijmo Application project you'll notice that it uses Wijmo controls for the default IU, and the necessary Wijmo assemblies are already referenced in the application's&lt;em&gt; _Layout.cshtml&lt;/em&gt; page. Here's the page that I'm talking about: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style="width: 600px; overflow: auto"&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;@ViewBag.Title&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="@Url.Content("&lt;/span&gt;~/&lt;span class="attr"&gt;Content&lt;/span&gt;/&lt;span class="attr"&gt;Site&lt;/span&gt;.&lt;span class="attr"&gt;css&lt;/span&gt;&lt;span class="kwrd"&gt;")"&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span class="kwrd"&gt;="stylesheet"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/css"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="http://cdn.wijmo.com/themes/sterling/jquery-wijmo.css"&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span class="kwrd"&gt;="stylesheet"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/css"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="http://cdn.wijmo.com/jquery.wijmo-open.1.2.0.css"&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span class="kwrd"&gt;="stylesheet"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/css"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="http://cdn.wijmo.com/jquery.wijmo-complete.1.2.0.css"&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span class="kwrd"&gt;="stylesheet"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/css"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.min.js"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/javascript"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &amp;lt;script src=&lt;span class="str"&gt;"http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.12/jquery-ui.min.js"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&lt;span class="str"&gt;"http://cdn.wijmo.com/external/jquery.bgiframe-2.1.3-pre.js"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&lt;span class="str"&gt;"http://cdn.wijmo.com/external/jquery.glob.min.js"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&lt;span class="str"&gt;"http://cdn.wijmo.com/external/jquery.mousewheel.min.js"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&lt;span class="str"&gt;"http://cdn.wijmo.com/external/raphael.js"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&lt;span class="str"&gt;"http://cdn.wijmo.com/jquery.wijmo-open.1.2.0.min.js"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&lt;span class="str"&gt;"http://cdn.wijmo.com/jquery.wijmo-complete.1.2.0.min.js"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;div &lt;span class="kwrd"&gt;class&lt;/span&gt;=&lt;span class="str"&gt;"page"&lt;/span&gt;&amp;gt;
        &amp;lt;div id=&lt;span class="str"&gt;"header"&lt;/span&gt;&amp;gt;
            &amp;lt;div id=&lt;span class="str"&gt;"title"&lt;/span&gt;&amp;gt;
                &amp;lt;h1&amp;gt;
                    My MVC Application&amp;lt;/h1&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div id=&lt;span class="str"&gt;"logindisplay"&lt;/span&gt;&amp;gt;
                @Html.Partial(&lt;span class="str"&gt;"_LogOnPartial"&lt;/span&gt;)
            &amp;lt;/div&amp;gt;
            &amp;lt;div id=&lt;span class="str"&gt;"menucontainer"&lt;/span&gt;&amp;gt;
                &amp;lt;ul id=&lt;span class="str"&gt;"nav"&lt;/span&gt;&amp;gt;
                    &amp;lt;li&amp;gt;@Html.ActionLink(&lt;span class="str"&gt;"Home"&lt;/span&gt;, &lt;span class="str"&gt;"Index"&lt;/span&gt;, &lt;span class="str"&gt;"Home"&lt;/span&gt;)&amp;lt;/li&amp;gt;
                    &amp;lt;li&amp;gt;@Html.ActionLink(&lt;span class="str"&gt;"About"&lt;/span&gt;, &lt;span class="str"&gt;"About"&lt;/span&gt;, &lt;span class="str"&gt;"Home"&lt;/span&gt;)&amp;lt;/li&amp;gt;
                &amp;lt;/ul&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div id=&lt;span class="str"&gt;"main"&lt;/span&gt;&amp;gt;
            @RenderBody()
            &amp;lt;div id=&lt;span class="str"&gt;"footer"&lt;/span&gt;&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;script type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;
        $(document).ready(&lt;span class="kwrd"&gt;function&lt;/span&gt; () {
            $(&lt;span class="str"&gt;"#nav"&lt;/span&gt;).wijmenu();
            $(&lt;span class="str"&gt;".button"&lt;/span&gt;).button();
            $(&lt;span class="str"&gt;":input[type='submit']"&lt;/span&gt;).button();
            $(&lt;span class="str"&gt;":input[type='checkbox']"&lt;/span&gt;).wijcheckbox();
            $(&lt;span class="str"&gt;":input[type='radio']"&lt;/span&gt;).wijradio();
            $(&lt;span class="str"&gt;":input[type='text'],:input[type='password'],textarea"&lt;/span&gt;).not(&lt;span class="str"&gt;":wijmo-wijinputnumber"&lt;/span&gt;).not(&lt;span class="str"&gt;":wijmo-wijinputmask"&lt;/span&gt;).not(&lt;span class="str"&gt;":wijmo-wijinputdate"&lt;/span&gt;).wijtextbox();
            $(&lt;span class="str"&gt;"select"&lt;/span&gt;).not(&lt;span class="str"&gt;":wijmo-wijcombobox"&lt;/span&gt;).wijdropdown();
        });
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;As you can see the application already has few widgets laid out in the _Layout.cshtml file. Here's a sample usage below: 
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/span&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="button"&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="button"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Wijmo Button"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;br /&gt;Calling the class "button" will enable the button to become a Wijmo HTML. Take a look the screen shot below for sample comparison. 

&lt;br /&gt;

&lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij4.jpg" width="413" height="305" /&gt; 

&lt;br /&gt;

&lt;br /&gt;&lt;span style="font-family: tahoma"&gt;Can you see the difference? =} Now let's try to play around with some widgets that are not pre-defined in our _Layout.cshtml file. But before that we will update the Wijmo references first via Nuget. To do this just just follow this few steps: 
  &lt;br /&gt;

  &lt;br /&gt;1. Go to Project menu -&amp;gt; Add Library Package Reference. 

  &lt;br /&gt;2. In the Add Library Package Reference diaglog box select Online and then click NuGet official package source. 

  &lt;br /&gt;3. At the upper right corner, type in "Wijmo" in the search field box. 

  &lt;br /&gt;4. You should be able to see the following: &lt;/span&gt;

&lt;br /&gt;

&lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij3.jpg" width="577" height="163" /&gt; 

&lt;br /&gt;

&lt;br /&gt;5. Click Install 

&lt;br /&gt;

&lt;br /&gt;After installation, you'll notice that additional js files, css files and images will be added within the Content and Script folders of your application: 

&lt;br /&gt;

&lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij5.jpg" width="326" height="454" /&gt; 

&lt;br /&gt;

&lt;br /&gt;Now let's go ahead and try some Wijmo wigets. In this demo we'll going to use wijmo tab first. Add the following mark up in your View: 

&lt;br /&gt;

&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="wijTab"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="#tab0"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;FIRST&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="#tab1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;SECOND&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="#tab2"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;THIRD&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

       &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="tab0"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
              First tab content.
       &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="tab1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
              Second tab content.
       &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="tab2"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
              Third tab content.
       &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/javascript"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

    $(document).ready(&lt;span class="kwrd"&gt;function&lt;/span&gt; () {
        $(&lt;span class="str"&gt;"#wijTab"&lt;/span&gt;).wijtabs();
    });

&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;br /&gt;Here's the output when running it on the browser: 

&lt;br /&gt;

&lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij6.jpg" width="447" height="394" /&gt; 

&lt;br /&gt;

&lt;br /&gt;

&lt;p&gt;&lt;/p&gt;
&lt;span style="font-family: tahoma"&gt;&lt;span style="font-size: small"&gt;We have now a cool and richer tabs in our page. Let's try something else. Let's try Wijmo accordion. Copy this mark up in your view:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; 
    &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;

&lt;p&gt;&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="wijAccordion"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h1&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Header 1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h1&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Content 1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Header 2&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Content 2&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Header 3&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Content 3&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/javascript"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    $(document).ready(&lt;span class="kwrd"&gt;function&lt;/span&gt; () {
        $(&lt;span class="str"&gt;"#wijAccordion"&lt;/span&gt;).wijaccordion();
    });
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: consolas; font-size: 9.5pt"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;The output would look something like this: 
        &lt;br /&gt;

        &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij7.jpg" width="455" height="436" /&gt; 

        &lt;br /&gt;

        &lt;br /&gt;Here's another example using Wijmo Combobox &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: consolas; font-size: 9.5pt"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;
        &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/span&gt;&lt;/span&gt;

    &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;select&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="wijCombobox"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Vinz"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Vinz&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Ianne"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Ianne&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Jeff"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Jeff&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Jhen"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Jhen&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Jhen"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Kenneth&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Jhen"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Xhaiden&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Jhen"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Kurt&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Jhen"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Angel&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;select&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/javascript"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    $(&lt;span class="kwrd"&gt;function&lt;/span&gt; () {
        $(&lt;span class="str"&gt;"#wijCombobox"&lt;/span&gt;).wijcombobox({
        });
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;br /&gt;The output would look something like this: 

    &lt;br /&gt;

    &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij8.jpg" width="348" height="503" /&gt; 

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: consolas; font-size: 9.5pt"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;
        &lt;br /&gt;There are some more cool widgets that are available for you such as Calenda, Charts, Diaglog, Expander, Grid, List, Menu, Pager, Progress bar, Slider, Splitter, Tree, Wizard etc.. You can find more details about each widgets here: &lt;a href="http://www.componentone.com/SuperProducts/WijmoComplete/"&gt;http://www.componentone.com/SuperProducts/WijmoComplete/&lt;/a&gt; 

        &lt;br /&gt;

        &lt;br /&gt;

        &lt;br /&gt;&lt;span style="color: rgb(0,0,128)"&gt;&lt;strong&gt;PART 2: Looking at Scaffolding Features:&lt;/strong&gt;&lt;/span&gt; 

        &lt;br /&gt;

        &lt;br /&gt;As you may know scaffolding allows you to quickly create rich Web applications. Scaffolding does all of the work for you by automatically creating your controllers and views, complete with CRUD (create, 

        &lt;br /&gt;

        &lt;br /&gt;read, update, delete) operations and validation. Wijmo further enhances the application with Wijmo widgets and styles. If you are new to ASP.NET MVC then I'd suggest you to look at my previous article here:&lt;span style="text-decoration: underline"&gt; &lt;/span&gt;&lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2011/06/03/asp.net-mvc-3-creating-a-simple-sign-up-form.aspx"&gt;http://geekswithblogs.net/dotNETvinz/archive/2011/06/03/asp.net-mvc-3-creating-a-simple-sign-up-form.aspx&lt;/a&gt; 

        &lt;br /&gt;

        &lt;br /&gt;

        &lt;br /&gt;&lt;strong&gt;STEP 1: Creating the Database&lt;/strong&gt; 

        &lt;br /&gt;

        &lt;br /&gt;For this example I created a simple database called "Demo_DB.mdf" and added it into the application's App_Data folder and use it as our database. 

        &lt;br /&gt;

        &lt;br /&gt;If you don't have a database installed then you can add a reference to &lt;em&gt;EntityFramework.SqlServerCompact&lt;/em&gt; library. Adding this library allows you to define the object model without having any database, and when you run the project, the database will be dynamically created. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;To do this just: 
        &lt;br /&gt;

        &lt;br /&gt;1. Right click on the project name and select "Add Library Package Reference" 

        &lt;br /&gt;2. Under installed Packages, select Online and type in "EntityFramework.SqlServerCompact" in the search field box. 

        &lt;br /&gt;

        &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij9.jpg" width="554" height="233" /&gt; 

        &lt;br /&gt;

        &lt;br /&gt;3. Click install and when it's done click Finish 

        &lt;br /&gt;4. Click Close and in the Solution explorer, right-click the project name and select Build to make sure the object model is compiled. 

        &lt;br /&gt;

        &lt;br /&gt;

        &lt;br /&gt;&lt;strong&gt;STEP 2: Adding the Model&lt;/strong&gt; 

        &lt;br /&gt;

        &lt;br /&gt;I'm going to use Entity Framework as our Data Access mechanism so that we can program against the conceptual application model instead of progamming directly against  our database. Before we add the EDMX file lets create a "DB" folder within the "Model" folder first and then add the EDMX file there. To add the EDMX file just 

        &lt;br /&gt;

        &lt;br /&gt;1. Right-click on the "DB" folder, select Add -&amp;gt; New Item 

        &lt;br /&gt;2. Select ADO.NET Entity Data Model and then click Add 

        &lt;br /&gt;3. Select "Generate from Database" and then click Next 

        &lt;br /&gt;4. Click Next again and under Table select the table that you want to use. In this case I'm going to select the "Music" table as shown below: 

        &lt;br /&gt;

        &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij10.jpg" width="384" height="276" /&gt; 

        &lt;br /&gt;

        &lt;br /&gt;5. Click Finish to generate the entity model for you. 

        &lt;br /&gt;

        &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij11.jpg" width="161" height="224" /&gt; 

        &lt;br /&gt;

        &lt;br /&gt;What happend there is that EF will automatically generates the Business object for you within the Entity Data Model(EDM) that we have just created and let you query against it.The EDM is the main gateway by which you retrieve objects from the database and resubmit changes. 

        &lt;br /&gt;

        &lt;br /&gt;&lt;strong&gt;STEP 3: Adding the View Model&lt;/strong&gt; 

        &lt;br /&gt;

        &lt;br /&gt;Just to recap Entity Framework will generate the business objects and manage Data Access within the application. As a result, the class Music is automatically created by EF and it features all the fields in the database table as properties of the class. 

        &lt;br /&gt;

        &lt;br /&gt;I don't want to use this class direclty in the View so I decided to create a separate class so that I can have a full control over it. Now let's add a the MusicModel class by right-clicking on the "Models" folder then select Add -&amp;gt; Class. Here's the code block for the "MusicModel.cs" class. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: consolas; font-size: 9.5pt"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;
        &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/span&gt;&lt;/span&gt;

    &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.ComponentModel.DataAnnotations;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; MVC3Wijmo.Models
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MusicModels
    {
       [Required]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Title { get; set; }
       [Required]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Artist { get; set; }
        [Required]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Genra { get; set; }
        [Required]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; DateTime Year { get; set; }
       [DataType(DataType.MultilineText)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Description { get; set; }

        [Range(0, 10), UIHint(&lt;span class="str"&gt;"IntSlider"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; Rating { get; set; }
    }
}&lt;/pre&gt;
  &lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: consolas; font-size: 9.5pt"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Noticed that I added the Required and some other attributes for each property in the class. This attribute is called Data Annotations. Data annotations are attribute classes that lives in the System.ComponentModel.DataAnnotations namespace that you can use to to decorate classes or properties to enforce pre-defined validation rules. 
        &lt;br /&gt;

        &lt;br /&gt;&lt;strong&gt;STEP 4: Adding the Controller&lt;/strong&gt; 

        &lt;br /&gt;

        &lt;br /&gt;1. In the Solution Explorer, right-click the Controllers folder and select Add -&amp;gt; Controller. The Add Controller dialog box opens. 

        &lt;br /&gt;2. Enter a Controller name, for example, MusicController. Click Add to generate the file. The file should look something like this: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Mvc;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; MVC3Wijmo.Controllers
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MusicController : Controller
    {
       &lt;span class="rem"&gt;//&lt;/span&gt;
        &lt;span class="rem"&gt;// GET: /Music/&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Index()
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; View();
        }
    }
}&lt;/pre&gt;

&lt;p&gt;
  &lt;br /&gt;

  &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;3. Right Click on the Index() method and select Add View. The Add View diaglog box opens. 
      &lt;br /&gt;4. Check "Create stronly types view" and select the "MusicModel" class 

      &lt;br /&gt;5. Under Scaffold template, select "Create" 

      &lt;br /&gt;6. Check "Use a layout" and then browse the _Layout.cshtml file. 

      &lt;br /&gt;7. Click Add to generate the file. 

      &lt;br /&gt;8. Running the page will give you this cool and slicker UI in the browser. &lt;/span&gt;&lt;/span&gt;

  &lt;br /&gt;

  &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/wij12.jpg" width="521" height="798" /&gt; 

  &lt;br /&gt;

  &lt;br /&gt;

  &lt;br /&gt;Cool isn't it? =} 

  &lt;br /&gt;

  &lt;br /&gt;

  &lt;br /&gt;&lt;strong&gt;REFFERENCES AND DOWNLOADS:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: consolas; font-size: 9.5pt"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;a href="http://www.componentone.com/SuperProducts/StudioMVCWijmo/"&gt;http://www.componentone.com/SuperProducts/StudioMVCWijmo/&lt;/a&gt; 

        &lt;br /&gt;&lt;a href="http://www.componentone.com/SuperProducts/WijmoComplete/"&gt;http://www.componentone.com/SuperProducts/WijmoComplete/&lt;/a&gt; 

        &lt;br /&gt;&lt;a href="http://www.componentone.com/SuperProducts/WijmoScaffoldingMVC/"&gt;http://www.componentone.com/SuperProducts/WijmoScaffoldingMVC/&lt;/a&gt; 

        &lt;br /&gt;

        &lt;br /&gt;

        &lt;br /&gt;All I can say is that I'm really impressed with this UI Tools. It saves lots of time in developing your UI (especially if you are not that good in UI development) and it provides more flexibilty, interactive views and richer UI to make your page slicker. Thanks to ComponentOne team and Geekswithblogs team for giving me the opportunity to utilize this cool components. It's really Awesome!!! =} 

        &lt;br /&gt;

        &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: consolas; font-size: 9.5pt"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Hope someone find this post useful! 
        &lt;br /&gt;

        &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9d162490-8871-4ff1-a041-4e6d4fa00269" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET+MVC" rel="tag"&gt;ASP.NET MVC&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Wijmo" rel="tag"&gt;Wijmo&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/146626.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/08/22/product-review---componentone-studio-for-mvc-wijmo.aspx</guid>
            <pubDate>Mon, 22 Aug 2011 10:08:51 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/146626.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/08/22/product-review---componentone-studio-for-mvc-wijmo.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/146626.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/146626.aspx</trackback:ping>
        </item>
        <item>
            <title>ASP.NET MVC 3: Creating a Simple Sign-Up Form</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/06/03/asp.net-mvc-3-creating-a-simple-sign-up-form.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;In this article I'm going to demonstrate how to create a simple sign-up form using ASP.NET MVC 3. So basically in this demo you will learn the following:        &lt;br /&gt;        &lt;br /&gt;How to insert data to the database with Entity Framework         &lt;br /&gt;How to validate the Form using Data Annotations         &lt;br /&gt;How to Authenticate users after sign up using FormsAuthentication         &lt;br /&gt;        &lt;br /&gt;Note that before you continue reading this article be sure that you have the basic understanding about ASP.NET MVC in general. You can refer the following links below to learn more about ASP.NET MVC:         &lt;br /&gt;        &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd381412%28VS.98%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd381412%28VS.98%29.aspx&lt;/a&gt;         &lt;br /&gt;&lt;a href="http://www.asp.net/mvc/whatisaspmvc"&gt;http://www.asp.net/mvc/whatisaspmvc&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(0,51,102)"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;STEP 1. Adding a new ASP.NET MVC project&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;        &lt;br /&gt;        &lt;br /&gt;Let's go ahead and fire up Visual Studio 2010 and then select File -&amp;gt; New Project -&amp;gt; ASP.NET MVC 3 Web Application. See the screen shot below for more clearer view:         &lt;br /&gt;        &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/mvc1.jpg" width="543" height="404" /&gt;         &lt;br /&gt;        &lt;br /&gt;Now click OK and on the next form select Empty Template -&amp;gt; select Razor as the View engine and then click OK to generate the default files.&lt;/span&gt;&lt;/span&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(0,51,102)"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;STEP 2: Setting up the Model&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;        &lt;br /&gt;        &lt;br /&gt;In this demo, I'm going to use Entity framework as our Data Access mechanism sothat we can program against the conceptual application model instead of progamming directly against  our database.         &lt;br /&gt;        &lt;br /&gt;Add the following folders under the Models folder:         &lt;br /&gt;        &lt;br /&gt;    DB         &lt;br /&gt;    ObjectManager         &lt;br /&gt;    ViewModel         &lt;br /&gt;        &lt;br /&gt;The application structure would like something like below:&lt;/span&gt;&lt;/span&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/mvc2.jpg" width="328" height="338" /&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;We will create our Entity Model (EDMX) in the DB folder. To do this right click on the "DB" folder and select Add -&amp;gt; New Item -&amp;gt; Data -&amp;gt; ADO.NET Entity Data Model. &lt;/span&gt;&lt;/span&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef2.jpg" width="528" height="341" /&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Noticed that I named the entity as "SampleModel" just for the purpose of this demo. You may want to name it to a more appropriate name based on your requirements but for this example let's just use "SampleModel". Now click Add to continue and on the next step select "Generate from database" and click Next. On the next step you can connect or browse to the database that you want to use in the application and test the connection string by clicking on the "Test Connection" button and if it succeeds then you can continue by clicking OK and then Next.        &lt;br /&gt;        &lt;br /&gt;Note that in this example I created a simple database called "DeveloperReport.mdf" and added it into the application's App_Data folder and use it as our database. See the screen shot below:&lt;/span&gt;&lt;/span&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef3.jpg" width="528" height="437" /&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;On the next step we can add the table(s), views or stored procedures that we want to use in the application by selecting the checkbox. See below screenshot: &lt;/span&gt;&lt;/span&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef4.jpg" width="524" height="409" /&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Noticed that I've only selected the "SysUser" table. This is because we are going to use this table for doing insert and we don't need anything else. Now click on Finish button to generate the entity model for you. See the screenshot below: &lt;/span&gt;&lt;/span&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef5.jpg" width="205" height="285" /&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;What happend there is that EF will automatically generates the Business object for you within the Entity Data Model(EDM) that we have just created and let you query against it.The EDM is the main gateway by which you retrieve objects from the database and resubmit changes.        &lt;br /&gt;        &lt;br /&gt;        &lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(0,51,102)"&gt;STEP 3: Adding the ViewModel Class&lt;/span&gt;&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;Just to recap Entity Framework will generate the business objects and manage Data Access within the application. As a result, the class SysUser is automatically created by EF and it features all the fields in the database table as properties of the class.         &lt;br /&gt;        &lt;br /&gt;I don't want to use this class direclty in the View so I decided to create a separate class that just holds the properties I need in the View. Now let's add a the UserView class by right-clicking on the "ViewModels" folder then select Add -&amp;gt; Class. Here's the code block for the "UserView.cs" class.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.ComponentModel.DataAnnotations;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; MVCDemo.Models.ViewModels {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; UserView {
        [Required]
        [Display(Name = &lt;span class="str"&gt;"First Name"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; FirstName { get; set; }

        [Required]
        [Display(Name = &lt;span class="str"&gt;"Last Name"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; LastName { get; set; }

        [Required]
        [Display(Name = &lt;span class="str"&gt;"Contact Number"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ContactNumber { get; set; }

        [Required]
        [Display(Name = &lt;span class="str"&gt;"Login ID"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; LoginID { get; set; }

        [Required]
        [Display(Name = &lt;span class="str"&gt;"Password"&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Password { get; set; }
    }
}&lt;/pre&gt;

&lt;p&gt;
  &lt;br /&gt;

  &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Noticed that I added the Required and DisplayName attributes for each property in the UserView class. This attributes is called Data Annotations. Data annotations are attribute classes that live in the System.ComponentModel.DataAnnotations namespace that you can use to to decorate classes or properties to enforce pre-defined validation rules. 
      &lt;br /&gt;

      &lt;br /&gt;I'll use this validation technique because I want to keep a clear separation of concerns by using the MVC pattern and couple that with data annotations in the model, then your validation code becomes much simpler to write, maintain, and test. 

      &lt;br /&gt;

      &lt;br /&gt;For more information about Data Annotations then you can refer this link: http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.aspx. And of course you can find more examples about it by doing a simple search at google /bing &lt;img alt="" src="http://geekswithblogs.net/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/wink_smile.gif" /&gt;&lt;/span&gt;&lt;/span&gt; 

  &lt;br /&gt;

  &lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(0,51,102)"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;STEP 4: Adding the UserManager Class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; 
      &lt;br /&gt;

      &lt;br /&gt;The next step that we are going to do is to create the User manager class that would handle the (CRUD operations) create,update,fetch and delete operations of a certain table. The purpose of this class is to separate the actual data opertions from our controller and to have a central class for handling insert,update,fetch and delete operations. But please note that in this example I'm only be doing the insert part in which a user can add new data from the View to the database. I'll talk about how to do update,fetch and delete with MVC in my next article. So this time we'll just focus on the insertion part first. 

      &lt;br /&gt;

      &lt;br /&gt;Now right click on the "Model" folder and add a new class by selecting Add -&amp;gt; Class and since we are going to manipulate the SysUser table then we will name the class as "UserManager". Here's the code block for the "UserManager.cs" class: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;p&gt;&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; MVCDemo.Models.DB;
&lt;span class="kwrd"&gt;using&lt;/span&gt; MVCDemo.Models.ViewModels;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; MVCDemo.Models.ObjectManager {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; UserManager {

        &lt;span class="kwrd"&gt;private&lt;/span&gt; DeveloperReportEntities dre = &lt;span class="kwrd"&gt;new&lt;/span&gt; DeveloperReportEntities();

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Add(UserView user) {
            DB.SysUser sysUser = &lt;span class="kwrd"&gt;new&lt;/span&gt; DB.SysUser();
            sysUser.SysUserLoginID = user.LoginID;
            sysUser.SysPassword = user.Password;
            sysUser.FirstName = user.FirstName;
            sysUser.LastName = user.LastName;
            sysUser.ContactNumber = user.LastName;

            dre.AddToSysUsers(sysUser);
            dre.SaveChanges();
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; IsUserLoginIDExist(&lt;span class="kwrd"&gt;string&lt;/span&gt; userLogIn) {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; (from o &lt;span class="kwrd"&gt;in&lt;/span&gt; dre.SysUsers &lt;span class="kwrd"&gt;where&lt;/span&gt; o.SysUserLoginID == userLogIn select o).Any();
        }
    }
}&lt;/pre&gt;

  &lt;p&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;br /&gt;

&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(0,51,102)"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;STEP 4: Adding the Controllers&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; 
    &lt;br /&gt;

    &lt;br /&gt;Since our model is already set then let's go ahead and add the "AccountController". To do this just right click on the "Controllers" folder and select Add -&amp;gt; Controller. Since our aim is to create a simple sign-up form then name the controller as "AccountController" and then click Add to generate the "AccountController" class for you. 

    &lt;br /&gt;

    &lt;br /&gt;Now here's the code block for the "AccountController":&lt;/span&gt;&lt;/span&gt; 

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;p&gt;&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Mvc;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Security;
&lt;span class="kwrd"&gt;using&lt;/span&gt; MVCDemo.Models.ViewModels;
&lt;span class="kwrd"&gt;using&lt;/span&gt; MVCDemo.Models.ObjectManager;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; MVCDemo.Controllers
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AccountController : Controller
    {
        &lt;span class="rem"&gt;// GET: /Account/SignUp&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult SignUp() {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; View(&lt;span class="str"&gt;"SignUp"&lt;/span&gt;);
        }

        &lt;span class="rem"&gt;// POST: /Account/SignUp&lt;/span&gt;
        [HttpPost]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult SignUp(UserView user) {
            &lt;span class="kwrd"&gt;try&lt;/span&gt; {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (ModelState.IsValid) {
                    UserManager userManager = &lt;span class="kwrd"&gt;new&lt;/span&gt; UserManager();
                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (!userManager.IsUserLoginIDExist(user.LoginID)) {
                        userManager.Add(user);
                        FormsAuthentication.SetAuthCookie(user.FirstName, &lt;span class="kwrd"&gt;false&lt;/span&gt;);
                        &lt;span class="kwrd"&gt;return&lt;/span&gt; RedirectToAction(&lt;span class="str"&gt;"Welcome"&lt;/span&gt;, &lt;span class="str"&gt;"Home"&lt;/span&gt;);
                    }
                    &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                        ModelState.AddModelError(&lt;span class="str"&gt;""&lt;/span&gt;, &lt;span class="str"&gt;"LogID already taken"&lt;/span&gt;);
                    }
                }
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt; {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; View(user);
            }

            &lt;span class="kwrd"&gt;return&lt;/span&gt; View(user);
        }
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;The AccountController has two main methods. The first one is the "SignUp" which returns the "SignUp.cshtml" View. The second one also named as "SignUp" but it is decorated with the "[HttpPost]" attribute. This attribute specifies that the overload of the "SignUp" method can be invoked only for POST requests. 
      &lt;br /&gt;

      &lt;br /&gt;The second method is responsible for inserting new entry to the database and automatically authenticate the users using FormsAuthentication.SetAuthCookie() method. this method creates an authentication ticket for the supplied user name and adds it to the cookies collection of the response, or to the URL if you are using cookieless authentication. After authenticating, we then redirect the users to the Welcome.cshtml page. 

      &lt;br /&gt;

      &lt;br /&gt;Now add another Controller and name it as "HomeController". This controller would be our controller for our default page. We will create the "Index" and the "Welcome" View for this controller in the next step. Here's the code for the "HomeController" class:&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Mvc;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; MVCDemo.Controllers
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; HomeController : Controller
    {
        &lt;span class="rem"&gt;// GET: /Home/&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Index()
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; View();
        }

        [Authorize]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Welcome() {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; View();
        }

    }
}&lt;/pre&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Noticed that we have two ActionResult method in the "HomeController". The "Index" method serve as our default redirect page and the "Welcome" method will be the page where we redirect the users after they have successfully registered. We also decorated it with the "[Authorize]" attribute so that this method will only be available for the logged-in users. &lt;/span&gt;&lt;/span&gt;

  &lt;br /&gt;

  &lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(0,51,102)"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;STEP 5: Adding the Views&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; 
      &lt;br /&gt;

      &lt;br /&gt;First let's add the following folders below under the "Views" folder: 

      &lt;br /&gt;

      &lt;br /&gt;    Home 

      &lt;br /&gt;    Account 

      &lt;br /&gt;

      &lt;br /&gt;Note: The reason for this is that the folder name should match the name of the Controllers you've created. So if you have HomeController then you should have a "Home" folder within your View. 

      &lt;br /&gt;

      &lt;br /&gt;Now under the "Home" folder add a new View. To do this just right click on the "Home" folder and select Add -&amp;gt; View. Name the view as "Index" and click Add to generate the Web Page (.cshtml). Here's the mark-up of the Index.cshtml:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

&lt;pre class="csharpcode"&gt;@{
    ViewBag.Title = "Welcome";
}

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Welcome&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

@Html.ActionLink("Click here to sign-up", "SignUp", "Account")&lt;/pre&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;As you can see there's no fancy about the mark-up above except that it contains the ActionLink which redirect you to the "SignUp" view within the "Account" folder. Now add again another View under the "Home" folder and name the view as "Welcome". The reason why we add the Welcome.cshtml view is because we will redirect the user in this page after they successfully signed up and nothing more. Here's the mark-up of the Welcome.cshtml:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

&lt;pre class="csharpcode"&gt;@{
    ViewBag.Title = "Welcome";
}

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Hi &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;b&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;@Context.User.Identity.Name&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;b&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;! Welcome to my website!&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Now under the "Account" folder add a new view and name it as "SignUp" and check the checkbox that says "create a strongly-typed views and in the Model class dropdownlist select "UserView" and then in the Scaffold template select "Create" and finally click Add to generate the Web Page for you. Take a look at the screen shot below for more clearer view of what I am talking about:&lt;/span&gt;&lt;/span&gt; 

  &lt;br /&gt;

  &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/mvc3.jpg" width="514" height="510" /&gt; 

  &lt;br /&gt;

  &lt;br /&gt;

  &lt;br /&gt;

  &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;And here's the generated mark up of the SignUp.cshtml:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
  &lt;pre class="csharpcode"&gt;@model MVCDemo.Models.ViewModels.UserView

@{
    ViewBag.Title = "SignUp";
}

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Sign-Up&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;="@Url.Content("&lt;/span&gt;~/&lt;span class="attr"&gt;Scripts&lt;/span&gt;/&lt;span class="attr"&gt;jquery&lt;/span&gt;.&lt;span class="attr"&gt;validate&lt;/span&gt;.&lt;span class="attr"&gt;min&lt;/span&gt;.&lt;span class="attr"&gt;js&lt;/span&gt;&lt;span class="kwrd"&gt;")"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/javascript"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&amp;lt;script src=&lt;span class="str"&gt;"@Url.Content("&lt;/span&gt;~/Scripts/jquery.validate.unobtrusive.min.js&lt;span class="str"&gt;")"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;fieldset&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;legend&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;UserView&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;legend&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-label"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.LabelFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.FirstName)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-field"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.EditorFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.FirstName)
            @Html.ValidationMessageFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.FirstName)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-label"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.LabelFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.LastName)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-field"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.EditorFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.LastName)
            @Html.ValidationMessageFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.LastName)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-label"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.LabelFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.ContactNumber)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-field"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.EditorFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.ContactNumber)
            @Html.ValidationMessageFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.ContactNumber)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-label"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.LabelFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.LoginID)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-field"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.EditorFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.LoginID)
            @Html.ValidationMessageFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.LoginID)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-label"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.LabelFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.Password)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="editor-field"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            @Html.PasswordFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.Password)
            @Html.ValidationMessageFor(model =&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; model.Password)
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;p&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="submit"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Create"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;p&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;fieldset&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
}

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    @Html.ActionLink("Return to Home page","Index", "Home")
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;The mark-up above is a strongly-type view. This strongly typed approach enables better compile-time checking of your code and richer IntelliSense in the Visual Studio editor. By including a @model statement at the top of the view template file, you can specify the type of object that the view expects. In this case it uses the MVCDemo.Models.ViewModels.UserView. 
      &lt;br /&gt;

      &lt;br /&gt;The View structure would like something like below:&lt;/span&gt;&lt;/span&gt; 

  &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/mvc4.jpg" width="329" height="409" /&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(0,51,102)"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;STEP : Running the Application&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; 
      &lt;br /&gt;

      &lt;br /&gt;Running the page will give you the following outputs: 

      &lt;br /&gt;

      &lt;br /&gt;On initial load: 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/mvc5.jpg" width="528" height="508" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;After clicking on the Sign-Up link: 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/mvc6.jpg" width="529" height="612" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;Sample screen shot that shows the validation 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/mvc7.jpg" width="528" height="579" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;Completing the form 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/mvc8.jpg" width="531" height="571" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;After successfully registered 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/mvc9.jpg" width="532" height="520" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;That's it! I hope someone find this post useful!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:895202c4-c2e7-4291-932f-fe6b25019690" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET+MVC" rel="tag"&gt;ASP.NET MVC&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Entity+Framework" rel="tag"&gt;Entity Framework&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/145698.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/06/03/asp.net-mvc-3-creating-a-simple-sign-up-form.aspx</guid>
            <pubDate>Fri, 03 Jun 2011 12:44:48 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/145698.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/06/03/asp.net-mvc-3-creating-a-simple-sign-up-form.aspx#feedback</comments>
            <slash:comments>23</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/145698.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/145698.aspx</trackback:ping>
        </item>
        <item>
            <title>ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/05/02/proudmonkey-controls-for-asp.net-4.0---customizing-the-modal.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;If you were using the customized &lt;/span&gt;&lt;/span&gt;&lt;a href="http://geekswithblogs.net/dotNETvinz/Tags/ProudMonkey%20Controls/default.aspx"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;MessageBox, ConfirmBox and FrameBox&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; controls and wanted to modify the look and feel of the these controls then you should be happy because the new version of the ProudMonkey controls provide some properties that you can set to customize the modal controls including the header, buttons, body background color, header fonts etc.        &lt;br /&gt;        &lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0,51,102)"&gt;&lt;span style="font-family: tahoma"&gt;You can download the new version here: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0,51,102)"&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/dotNETvinz/Version2.zip"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;ProudMonkey Controls Version 2&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;        &lt;br /&gt;        &lt;br /&gt;&lt;strong&gt;The MessageBox&lt;/strong&gt; provides the following properties:         &lt;br /&gt;        &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;HeaderImageUrl&lt;/span&gt; - This property sets the ImageUrl to be used as the background in the MessageBox header.&lt;em&gt; Note that the image should be 2 x 28 in size because this image will be repeated horizontally&lt;/em&gt;.         &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;HeaderBackgroundColor&lt;/span&gt; - This property sets the background color of the MessageBox header. You can use this property if you don't want to use the default header background of the MessageBox or if you don't want to set the HeaderImageUrl property.         &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;HeaderTextColor&lt;/span&gt; - This property sets the text fore color of the MessageBox header.         &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;HeaderTextFont&lt;/span&gt; - This property sets the text font of the MessageBox header.         &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;BodyBackgroundColor&lt;/span&gt; - This property sets the background color of the MessageBox body where the actual text is displayed.         &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;BodyTextColor&lt;/span&gt; - This property sets the text fore color of the actual content dispalyed in the body.         &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;BodyTextFont&lt;/span&gt; - This property sets the text font of the actual content displayed in the body         &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;OKButtonImageUrl&lt;/span&gt; - This property sets the ImageUrl to be used as the background image for the OK button.         &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;CloseButtonImageUrl&lt;/span&gt; - This property sets the ImageUrl to be used as the background image for the Close button.         &lt;br /&gt;        &lt;br /&gt;Note that if you don't set any of those properties the default styles will be automatically applied.         &lt;br /&gt;        &lt;br /&gt;Sample Usage:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:MessageBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="MessageBox1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; 
                &lt;span class="attr"&gt;HeaderImageUrl&lt;/span&gt;&lt;span class="kwrd"&gt;="Images/header.png"&lt;/span&gt;
                &lt;span class="attr"&gt;HeaderTextColor&lt;/span&gt;&lt;span class="kwrd"&gt;="White"&lt;/span&gt;
                &lt;span class="attr"&gt;HeaderTextFont&lt;/span&gt;&lt;span class="kwrd"&gt;="Arial Black"&lt;/span&gt;
                &lt;span class="attr"&gt;BodyBackgroundColor&lt;/span&gt;&lt;span class="kwrd"&gt;="#E1E5F0"&lt;/span&gt;
                &lt;span class="attr"&gt;BodyTextFont&lt;/span&gt;&lt;span class="kwrd"&gt;="Tahoma"&lt;/span&gt;
                &lt;span class="attr"&gt;BodyTextColor&lt;/span&gt;&lt;span class="kwrd"&gt;="#263F75"&lt;/span&gt;  
                &lt;span class="attr"&gt;OKButtonImageUrl&lt;/span&gt;&lt;span class="kwrd"&gt;="Images/btnOK.jpg"&lt;/span&gt;
                &lt;span class="attr"&gt;CloseButtonImageUrl&lt;/span&gt;&lt;span class="kwrd"&gt;="Images/btnClose.jpg"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Actual Output:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/pm4custom1.jpg" width="353" height="133" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/pm4custom2.jpg" width="354" height="135" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/pm4custom4.jpg" width="353" height="131" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/pm4custom5.jpg" width="351" height="131" /&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;The ConfirmBox &lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;also provides the same properties just like what the MessageBox does. The only additional properties are: 
      &lt;br /&gt;

      &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;YesButtonImageUrl&lt;/span&gt; - This property sets the ImageUrl to be used as the background image for the Yes button. 

      &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;NoButtonImageUrl&lt;/span&gt; - This property sets the ImageUrl to be used as the background image for the No button. 

      &lt;br /&gt;

      &lt;br /&gt;Again if you don't set any of those properties in the ConfirmBox control, the default styles will be automatically applied. 

      &lt;br /&gt;

      &lt;br /&gt;Sample Usage:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:ConfirmBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="ConfirmBox1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;
                &lt;span class="attr"&gt;YesButtonImageUrl&lt;/span&gt;&lt;span class="kwrd"&gt;="Images/btnYes.jpg"&lt;/span&gt;
                &lt;span class="attr"&gt;NoButtonImageUrl&lt;/span&gt;&lt;span class="kwrd"&gt;="Images/btnNo.jpg"&lt;/span&gt;
                &lt;span class="attr"&gt;CloseButtonImageUrl&lt;/span&gt;&lt;span class="kwrd"&gt;="Images/btnClose.jpg"&lt;/span&gt; 
                &lt;span class="attr"&gt;HeaderImageUrl&lt;/span&gt;&lt;span class="kwrd"&gt;="Images/header.png"&lt;/span&gt;
                &lt;span class="attr"&gt;HeaderTextColor&lt;/span&gt;&lt;span class="kwrd"&gt;="White"&lt;/span&gt;
                &lt;span class="attr"&gt;HeaderTextFont&lt;/span&gt;&lt;span class="kwrd"&gt;="Arial Black"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Actual Output:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/pm4custom6.jpg" width="373" height="131" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;

      &lt;br /&gt;&lt;strong&gt;The FrameBox &lt;/strong&gt;has the following properties: 

      &lt;br /&gt;

      &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;HeaderImageUrl&lt;/span&gt; - This property sets the ImageUrl to be used as the background in the FrameBox header. Note that the image should be 2 x 28 in size because this image will be repeated horizontally. 

      &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;HeaderBackgroundColor&lt;/span&gt; - This property sets the background color of the FrameBox header. 

      &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;HeaderTextColor&lt;/span&gt; - This property sets the text fore color of the MessageBox header. 

      &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;HeaderTextFont&lt;/span&gt; - This property sets the text font of the MessageBox header. 

      &lt;br /&gt;&lt;span style="color: rgb(153,51,0)"&gt;CloseButtonImageUrl&lt;/span&gt; - This property sets the ImageUrl to be used as the background image for the Close button.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Sample Usage:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:FrameBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="FrameBox1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;
              &lt;span class="attr"&gt;HeaderImageUrl&lt;/span&gt;&lt;span class="kwrd"&gt;="Images/header.png"&lt;/span&gt;
              &lt;span class="attr"&gt;HeaderTextColor&lt;/span&gt;&lt;span class="kwrd"&gt;="White"&lt;/span&gt;
              &lt;span class="attr"&gt;HeaderTextFont&lt;/span&gt;&lt;span class="kwrd"&gt;="Arial Black"&lt;/span&gt;
              &lt;span class="attr"&gt;CloseButtonImageUrl&lt;/span&gt;&lt;span class="kwrd"&gt;="Images/btnClose.jpg"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Actual Output:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/pm4custom7.jpg" width="411" height="343" /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; 
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;That's it! I hope someone find this post useful!&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d6e1e394-5b75-43fc-aa55-a07281e6075f" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ProudMonkey+Controls" rel="tag"&gt;ProudMonkey Controls&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/145124.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/05/02/proudmonkey-controls-for-asp.net-4.0---customizing-the-modal.aspx</guid>
            <pubDate>Mon, 02 May 2011 06:47:08 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/145124.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/05/02/proudmonkey-controls-for-asp.net-4.0---customizing-the-modal.aspx#feedback</comments>
            <slash:comments>15</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/145124.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/145124.aspx</trackback:ping>
        </item>
        <item>
            <title>Tip Of The Day - Remove GridView Row Highlighting on Edit Mode</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/04/26/tip-of-the-day---remove-gridview-row-highlighting-on.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Typically we will attach the mouseover and mouseout client-side events on the gridview rows to highlight rows on mouseover, but there are cases that we don't want to make the row highlighted when we are on edit mode. To do this we can check the GridView EditIndex to determine if the row is on edit mode and then do the validation there. Here's a sample code block below of what I am talking about:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style="width: 600px; overflow: auto"&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; GridView1_RowDataBound(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, GridViewRowEventArgs e) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (e.Row.RowType == DataControlRowType.DataRow) {
                &lt;span class="kwrd"&gt;string&lt;/span&gt; onmouseoverStyle = &lt;span class="str"&gt;"this.style.backgroundColor='blue';this.style.color ='white';"&lt;/span&gt;;
                &lt;span class="kwrd"&gt;string&lt;/span&gt; onmouseoutStyle = &lt;span class="str"&gt;"this.style.backgroundColor='white';this.style.color ='black';"&lt;/span&gt;;

                &lt;span class="kwrd"&gt;if&lt;/span&gt; (GridView1.EditIndex != -1) {
                    e.Row.Attributes.Remove(&lt;span class="str"&gt;"onmouseover"&lt;/span&gt;);
                }
                &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                    e.Row.Attributes.Add(&lt;span class="str"&gt;"onmouseover"&lt;/span&gt;, onmouseoverStyle);
                    e.Row.Attributes.Add(&lt;span class="str"&gt;"onmouseout"&lt;/span&gt;, onmouseoutStyle);
                }
            }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;As you can see the code above is very straight forward. What it does is it checks if the gridview is on edit mode and when it's on edit mode we removed the onmouseover attribute and when it's not we attach the onmouseover attribute again and apply the desired styles. That's simple! 
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;I hope someone find this post useful!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e4f98925-06a8-4862-9a6f-645e1e1263fd" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/GridView" rel="tag"&gt;GridView&lt;/a&gt;,&lt;a href="http://technorati.com/tags/TipsTricks" rel="tag"&gt;TipsTricks&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/145047.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/04/26/tip-of-the-day---remove-gridview-row-highlighting-on.aspx</guid>
            <pubDate>Tue, 26 Apr 2011 06:17:20 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/145047.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/04/26/tip-of-the-day---remove-gridview-row-highlighting-on.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/145047.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/145047.aspx</trackback:ping>
        </item>
        <item>
            <title>A Monkey Talks about ASP.NET</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/04/14/a-monkey-talks-about-asp.net.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Last week, I was &lt;/span&gt;&lt;/span&gt;&lt;a href="http://msdnphilippines.net/content/InterviewWithMVPVinceDurano.aspx?WT.mc_id=soc-f-ph-loc--Apr2011"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;interviewed&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; by &lt;/span&gt;&lt;/span&gt;&lt;a href="http://msdnphilippines.net/blogs/zandra/default.aspx"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Zandra Nilocas&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; from Microsoft Philippines. It was my first time experience to talk about something in front of the camera so it's not surprising that I looked like an idiot in that interview (you know swiveling my chair back and forth without noticing it).  &lt;img alt="" src="http://geekswithblogs.net/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/teeth_smile.gif" /&gt;         &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Anyway in the interview we talked about &lt;/span&gt;&lt;/span&gt;&lt;a href="http://asp.net/" target="_blank"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;ASP.NET&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; WebForms, MVC and Web Matrix in general and just to elaborate a bit of what we talked about and to clarify things out, I have decided to write this post... WebForms and MVC are two approaches for building &lt;/span&gt;&lt;/span&gt;&lt;a href="http://asp.net/" target="_blank"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;ASP.NET&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; applications. Both are good choices and both have their place in the market. WebForms is a development approach for Rapid Applications in which you can take advantage of the design surface, powerful server controls and components. So if you are familiar with drag-and-drop and event driven model or if you are coming from a Windows Application development and want to jump on web development then you can start with WebForms.  ASP.NET MVC on the other hand is another approach for building up dynamic web applications and provides a clean separation of concerns (the Model, the View and the Controller) and gives you full control over your codes, HTTP, Request, Response, JavaScripts, CSS, HTML, Get and Post and so on...Aside from WebForms and MVC there's another web development tool from Microsoft called WebMatrix and it's absolutely free . It is basically designed to provide easier entry into ASP.NET development - especially for those used to scripting technologies like PHP and classic ASP or those completely new to dynamic web development. With WebMatrix you can easily build a dynamic website within less than an hour because everything you need for web development is bundled into one including IIS Express, IDE, Sql Server Compact Edition, Razor, and a new programming Framework - Web Pages. It also provides a lot of built-in web templates that you can use.        &lt;br /&gt;        &lt;br /&gt;Now which development approach would I follow?         &lt;br /&gt;        &lt;br /&gt;Well the answer depends on the business needs. Again all approach are good choices but here's what I would like to suggest:         &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;If you are a windows application developer (I'm actually referring to VB6 or .Net windows forms programmers) and want to get started with ASP.NET then you can start working with WebForms.&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;If you wanted to build up web applications in just a short amount of time then you can go for WebForms.&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;If you are coming from  a classic ASP, PHP or even WebForms and wanted to embrace the web, value unit testing, separation of concerns then you can go for MVC.&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;If you are an experienced WebForm developer and wanted to know the &lt;em&gt;&lt;strong&gt;real&lt;/strong&gt; &lt;/em&gt;web development then you &lt;strong&gt;should&lt;/strong&gt; get to know MVC.&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;If you used PHP or classic ASP before, love scripting and wanted to enter the ASP.NET world then you go for WebMatrix.&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;If you wanted to build up web applications in just a short amount of time and you are already familiar with scripting technologies such as PHP or classic ASP then you go for WebMatrix.&lt;/span&gt;&lt;/span&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fbd21c1e-5129-4838-b388-cb1399d33ccc" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/General" rel="tag"&gt;General&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET+MVC" rel="tag"&gt;ASP.NET MVC&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Web+Matrix" rel="tag"&gt;Web Matrix&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/144863.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/04/14/a-monkey-talks-about-asp.net.aspx</guid>
            <pubDate>Thu, 14 Apr 2011 06:50:55 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/144863.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/04/14/a-monkey-talks-about-asp.net.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/144863.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/144863.aspx</trackback:ping>
        </item>
        <item>
            <title>Entity Framework - Editing, Updating and Deleting Data in the Form</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework---editing-updating-and-deleting-data-in-the.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework---fetching-and-populating-the-data-in-the.aspx"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Previously&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt; we've talked about how to fetch the data from the database and populate the form with EF. In this example I'm going to demonstrate how to do Edit,Update and Delete operations in the form with Entity Framework. And oh since this is a continuation of my &lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework---fetching-and-populating-the-data-in-the.aspx"&gt;previous example&lt;/a&gt; I would suggest you to refer that first before you go any further.         &lt;br /&gt;        &lt;br /&gt;&lt;strong&gt;STEP 1: Setting up the UI&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;Since this is a continuation of my previous example then I'm jus going to use the same layout and extend it a bit by adding some buttons on the form and a label control for displaying some message. Aside from that I have also moved the form fields inside a Panel control for validation purposes and removed the ReadOnly attribute for each TextBox. Here's the updated mark-up below:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;       &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;  &lt;div style="width: 600px; overflow: auto"&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Content2"&lt;/span&gt; &lt;span class="attr"&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class="kwrd"&gt;="MainContent"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:DropDownList&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="ddlUser"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;AppendDataBoundItems&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt; 
        &lt;span class="attr"&gt;AutoPostBack&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt; &lt;span class="attr"&gt;onselectedindexchanged&lt;/span&gt;&lt;span class="kwrd"&gt;="ddlUser_SelectedIndexChanged"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ListItem&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;--Select--&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:ListItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:DropDownList&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="pnlUserDetail"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Enabled&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;First Name:
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbFirstName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;Last Name: 
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbLastName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;Contact Number: 
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbContactNumber"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="lblMessage"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ForeColor&lt;/span&gt;&lt;span class="kwrd"&gt;="Green"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="btnEdit"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Edit"&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;="btnEdit_Click"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="btnUpdate"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Update"&lt;/span&gt; &lt;span class="attr"&gt;Visible&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;="btnUpdate_Click"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="btnCancel"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Cancel"&lt;/span&gt; &lt;span class="attr"&gt;Visible&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;="btnCancel_Click"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="btnDelete"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Delete"&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;="btnDelete_Click"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;p&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;br /&gt;&lt;strong&gt;STEP 2: Editing and Updating the Form&lt;/strong&gt; 

&lt;br /&gt;

&lt;br /&gt;Add the following method below in the UserManager class: 

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;       &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; UpdateUser(UserDetail userDetail) {
            var user = (from o &lt;span class="kwrd"&gt;in&lt;/span&gt; dre.SysUsers
                        &lt;span class="kwrd"&gt;where&lt;/span&gt; o.SysUserID == userDetail.SysUserID
                        select o).First();
            user.FirstName = userDetail.FirstName;
            user.LastName = userDetail.LastName;
            user.ContactNumber = userDetail.ContactNumber;

            dre.SaveChanges();
        }&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;The UpdateUser() is a method that handles the updating of data. This method take the UserDetail as the parameter. If you can still remember in my &lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework---fetching-and-populating-the-data-in-the.aspx"&gt;previous example&lt;/a&gt; particularly in STEP 2, the UserDatail is a class that holds some properties such as the SysUserID, FirstName, LastName and ContactNumber. 

      &lt;br /&gt;

      &lt;br /&gt;The first line within the method is we queried the SysUser object based on the userID using LINQ syntax and assigned the result into a variable user. The FirstOrDefault function is an eager function which returns the first element of a sequence that satisfies a specified condition. Once the LINQ FirstOrDefault function is invoked then EF will autmatically issue a parameterize SQL query to the database in which the SQL Server can understand and then bring back the result to the Entity Model. 

      &lt;br /&gt;

      &lt;br /&gt;After querying the data we then assign a new value to each field and then call SaveChanges() method to update the database with the changes. 

      &lt;br /&gt;

      &lt;br /&gt;Now let's go to the code behind part of the webform and perform the update by calling the method UpdateUser() from the UserManager class. Here are the code blocks below: 

      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;p&gt;
    &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

  &lt;pre class="csharpcode"&gt;       &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ToggleButton(&lt;span class="kwrd"&gt;bool&lt;/span&gt; isEdit){
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (isEdit) {
                btnEdit.Visible = &lt;span class="kwrd"&gt;false&lt;/span&gt;;
                btnDelete.Visible = &lt;span class="kwrd"&gt;false&lt;/span&gt;;
                btnUpdate.Visible = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
                btnCancel.Visible = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                btnEdit.Visible = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
                btnDelete.Visible = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
                btnUpdate.Visible = &lt;span class="kwrd"&gt;false&lt;/span&gt;;
                btnCancel.Visible = &lt;span class="kwrd"&gt;false&lt;/span&gt;;
            }

            pnlUserDetail.Enabled = isEdit;
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; UpdateUserDetail(UserDetail userDetail) {
            UserManager userMgr = &lt;span class="kwrd"&gt;new&lt;/span&gt; UserManager();
            userMgr.UpdateUser(userDetail);
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; btnEdit_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (ddlUser.SelectedItem.Value != &lt;span class="str"&gt;"0"&lt;/span&gt;) {
                ToggleButton(&lt;span class="kwrd"&gt;true&lt;/span&gt;);
                lblMessage.Text = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
            }
            &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                lblMessage.Text = &lt;span class="str"&gt;"Please select name from the list first."&lt;/span&gt;;
                lblMessage.ForeColor = System.Drawing.Color.Red;
            }
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; btnUpdate_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e) {

            UserDetail userDetail = &lt;span class="kwrd"&gt;new&lt;/span&gt; UserDetail();
            userDetail.SysUserID = Convert.ToInt32(ddlUser.SelectedItem.Value);
            userDetail.FirstName = tbFirstName.Text.TrimEnd();
            userDetail.LastName = tbLastName.Text.TrimEnd();
            userDetail.ContactNumber = tbContactNumber.Text.TrimEnd();

            UpdateUserDetail(userDetail);
            lblMessage.Text = &lt;span class="str"&gt;"Update Successful!"&lt;/span&gt;;
            ToggleButton(&lt;span class="kwrd"&gt;false&lt;/span&gt;);
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; btnCancel_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e) {
            ToggleButton(&lt;span class="kwrd"&gt;false&lt;/span&gt;);
        }&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;The ToggleButton() method is a method that returns a boolean type which is responsible for toggling the visibility of each buttons in the form during Edit,Update,cancel and Delete mode. 
      &lt;br /&gt;

      &lt;br /&gt;The UpdateUserDetail() is a method that takes UserDetail as the parameter. This method is the one who calls the UpdateUser() method from the UserManager class. 

      &lt;br /&gt;

      &lt;br /&gt;At btnUpdate_Click event we create an instance of the UserDetail class and assign the values from the form to the corresponsing fields. After that we call the method UpdateUserDetail() and pass the UserDetail object as the parameter. 

      &lt;br /&gt;

      &lt;br /&gt;Here's the output below when running it on the browser: 

      &lt;br /&gt;

      &lt;br /&gt;On initial load:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef10.jpg" width="389" height="383" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;After selecting an item from the DropDownList 
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;
      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef11.jpg" width="360" height="383" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;On Edit Mode (after clicking the edit button) 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef12.jpg" width="370" height="383" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;After Update 

      &lt;br /&gt;

      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef13.jpg" width="334" height="383" /&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;strong&gt;STEP 3: Deleting data from the Form&lt;/strong&gt; 

      &lt;br /&gt;

      &lt;br /&gt;Now lets implement the deletion part of the program. In the UserManager class add this method below:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;       &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; DeleteUser(&lt;span class="kwrd"&gt;int&lt;/span&gt; userID) {
            var user = (from o &lt;span class="kwrd"&gt;in&lt;/span&gt; dre.SysUsers
                        &lt;span class="kwrd"&gt;where&lt;/span&gt; o.SysUserID == userID
                        select o).First();

            dre.DeleteObject(user);
            dre.SaveChanges();
        }&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Just like the UpdateUser() method. We query the SysUser object based on the SysUserID and then assign the result in the variable user. After that we call the DeleteObject() to perform delete and then call the SaveChanges() method to reflect the changes to the database. 
      &lt;br /&gt;

      &lt;br /&gt;Here's the code in the code behind for the deletion:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;p&gt;
    &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

  &lt;pre class="csharpcode"&gt;        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; btnDelete_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (ddlUser.SelectedItem.Value != &lt;span class="str"&gt;"0"&lt;/span&gt;) {

                &lt;span class="rem"&gt;//Perform the Delete&lt;/span&gt;
                UserManager userMgr = &lt;span class="kwrd"&gt;new&lt;/span&gt; UserManager();
                userMgr.DeleteUser(Convert.ToInt32(ddlUser.SelectedItem.Value));

                &lt;span class="rem"&gt;//Re-bind the DropDownList&lt;/span&gt;
                ddlUser.Items.Clear();
                BindUserNames();

                &lt;span class="rem"&gt;//Clear the form fields&lt;/span&gt;
                tbFirstName.Text = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
                tbLastName.Text = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
                tbContactNumber.Text = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;

                lblMessage.Text = &lt;span class="str"&gt;"Delete Successful!"&lt;/span&gt;;

            }
            &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                lblMessage.Text = &lt;span class="str"&gt;"Please select name from the list first."&lt;/span&gt;;
                lblMessage.ForeColor = System.Drawing.Color.Red;
            }
        }&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Since we don’t want users to delete the information right away, we need to prompt them a confirmation message if they wish to continue the deletion or not. To do this we could simply hook up the javascript confirm function in the delete button. Take a look at the highlighted code below:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;p&gt;
    &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="btnDelete"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Delete"&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;="btnDelete_Click"&lt;/span&gt; &lt;span class="attr"&gt;OnClientClick&lt;/span&gt;&lt;span class="kwrd"&gt;="return confirm('The selected user information will be deleted. Do you wish to continue?');return false;"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Here's the output below when running the page and perform the delete: 
      &lt;br /&gt;

      &lt;br /&gt;On Deletion: 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef14.jpg" width="423" height="324" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;After Deletion: 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef15.jpg" width="356" height="369" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;

      &lt;br /&gt;That's it! I hope someone find this post useful! 

      &lt;br /&gt;

      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2382c01e-f110-48ac-a6bd-24c618fa9c75" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Entity+Framework" rel="tag"&gt;Entity Framework&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/144691.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework---editing-updating-and-deleting-data-in-the.aspx</guid>
            <pubDate>Mon, 04 Apr 2011 12:00:25 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/144691.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework---editing-updating-and-deleting-data-in-the.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/144691.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/144691.aspx</trackback:ping>
        </item>
        <item>
            <title>Entity Framework - Fetching and Populating the Data in the Form</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework---fetching-and-populating-the-data-in-the.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;In &lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework----inserting-data-to-database.aspx"&gt;Part 1&lt;/a&gt; we've talked about how to insert data to the database with Entity Framework. In this part I'm going to demonstrate how to fetch the data from the database and populate the form fields with Entity Framework.         &lt;br /&gt;        &lt;br /&gt;&lt;strong&gt;STEP 1: Setting up the Form&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;To get started let's go ahead and fire-up visual studio and add a new WebForm. For the simplicity of this demo I just set up the form like this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;  &lt;div style="width: 600px; overflow: auto"&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Content2"&lt;/span&gt; &lt;span class="attr"&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class="kwrd"&gt;="MainContent"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:DropDownList&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="ddlUser"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;AppendDataBoundItems&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ListItem&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;--Select--&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:ListItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:DropDownList&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;First Name:
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbFirstName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;Last Name: 
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbLastName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;Contact Number: 
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbContactNumber"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;As you can see there's nothing fancy in the mark-up above. What we want to do here is we are going to populate the DropDownList "ddlUser" with the list of names from the database and then populate the remaining textbox with the details based on the selected name from the dropdownlist. And since we only want to display the information in the page so I set the ReadOnly attribute in the TextBox to true. 
      &lt;br /&gt;

      &lt;br /&gt;&lt;strong&gt;STEP 2: Creating the View Model&lt;/strong&gt; 

      &lt;br /&gt;

      &lt;br /&gt;If you remember in &lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework----inserting-data-to-database.aspx"&gt;Part 1&lt;/a&gt; particularly in STEP 4, we had an Object Manager Class for each table which is responsible for handling any operations in the database and since we are going to fetch the list of names from the database then we will add a method in UserManager class. 

      &lt;br /&gt;

      &lt;br /&gt;As a recap, Entity Framework will generate the business objects and manage Data Access within the application. As a result, the class SysUser is automatically created by EF and it features all the fields in the database table as properties of the class. 

      &lt;br /&gt;

      &lt;br /&gt;I don't want to use this class for listing all names of the users. It would be wasteful as EF will bring back all information in the table inclusing the LastName, ContactNumber, SysUserLogIn and Password. All we need for populating the DropDownList is the SysUserID and FirstName. So I decided to create a separate class that just holds these properties:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WebAppDemo.Model.ViewModel {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; UserName {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; SysUserID { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; FirstName { get; set; }
    }
}&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Also I created a separate class for listing the user detail information and create the necessary fields that I need to use like below: 
      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WebAppDemo.Model.ViewModel {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; UserDetail {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; SysUserID { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; FirstName { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Lastname { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ContactNumber { get; set; }
    }
}&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Both those classes above are stored under Model -&amp;gt; ViewModel folder within the application, as you can probably guess from the namespaces they have ;). 
      &lt;br /&gt;

      &lt;br /&gt;Now since we already have the fields we need for populating the DropDownList and the form then we can start adding new methods for fecthing the list of names and user details in the UserManager class. Here's the code block below: 

      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; WebAppDemo.Model.DB;
&lt;span class="kwrd"&gt;using&lt;/span&gt; WebAppDemo.Model.ViewModel;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WebAppDemo.Model {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; UserManager {

        &lt;span class="kwrd"&gt;private&lt;/span&gt; DeveloperReportEntities dre = &lt;span class="kwrd"&gt;new&lt;/span&gt; DeveloperReportEntities();

        &lt;span class="kwrd"&gt;public&lt;/span&gt; IEnumerable&amp;lt;UserName&amp;gt; GetUserFirstName() {
            var user = from o &lt;span class="kwrd"&gt;in&lt;/span&gt; dre.SysUsers
                       select &lt;span class="kwrd"&gt;new&lt;/span&gt; UserName {
                           SysUserID = o.SysUserID,
                           FirstName = o.FirstName
                       };
            &lt;span class="kwrd"&gt;return&lt;/span&gt; user.ToList();
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; IEnumerable&amp;lt;UserDetail&amp;gt; GetUserDetail(&lt;span class="kwrd"&gt;int&lt;/span&gt; userID) {
            var user = from o &lt;span class="kwrd"&gt;in&lt;/span&gt; dre.SysUsers
               &lt;span class="kwrd"&gt;where&lt;/span&gt; o.SysUserID == userID
                       select &lt;span class="kwrd"&gt;new&lt;/span&gt; UserDetail {
                           SysUserID = o.SysUserID,
                           FirstName = o.FirstName,
                           LastName = o.LastName,
                           ContactNumber = o.ContactNumber
                       };
            &lt;span class="kwrd"&gt;return&lt;/span&gt; user.ToList();
        }

    }
}&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;The code above is the LINQ syntax for querying data. As you can see we query the SysUser object based on the parameter we passed on the GetUserFirstName() method. Once we invoke the LINQ ToList() function, this LINQ query will issue a parameterize SQL query to the database in which the SQL Server can understand and then bring back the results to the Entity Model. 
      &lt;br /&gt;

      &lt;br /&gt;The GetUserFirstName is a method that gets all the User FirstName along with the SysUserID. This method returns an IEnumrable of UserName class. The GetUserDetail() is a method that gets the user detail information based on the ID passed on to the query. This method returns a List of UserDetail class. 

      &lt;br /&gt;

      &lt;br /&gt;One of the cool things about EF is we don’t need to worry about how the query is being constructed because EF will take care of that for you including mapping of the data types from your table columns, mapping relationships between tables, etcetera and etcetera. Always keep in mind that EF is an ORM (Object Relational Mapper) and so we don’t need to deal directly with databases, tables and columns but instead we deal with the objects that is in the Entity and query the data against it using LINQ syntax. 

      &lt;br /&gt;

      &lt;br /&gt;&lt;strong&gt;STEP 3: Populating the DropDownList&lt;/strong&gt; 

      &lt;br /&gt;

      &lt;br /&gt;Now lets proceed to the code behind file of the WebForm and populate the DropDownList. Here's the code block for binding the dropdownlist control in the webform. Typically we do this at Page_Load event within Not IsPostBack block like below: 

      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; WebAppDemo.Model;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WebAppDemo {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; WebForm2 : System.Web.UI.Page {

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; BindUserNames() {
            UserManager userMgr = &lt;span class="kwrd"&gt;new&lt;/span&gt; UserManager();
            ddlUser.DataSource = userMgr.GetUserFirstName();
            ddlUser.DataTextField = &lt;span class="str"&gt;"FirstName"&lt;/span&gt;;
            ddlUser.DataValueField = &lt;span class="str"&gt;"SysUserID"&lt;/span&gt;;
            ddlUser.DataBind();
        }
        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Page_Load(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (!IsPostBack)
                BindUserNames();
        }
    }
}&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;running the code above will display something like this in the browser:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef8.jpg" width="487" height="331" /&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;strong&gt;STEP 4: Populating the Form with the User Details&lt;/strong&gt; 

      &lt;br /&gt;

      &lt;br /&gt;Now we already have the list of first names in the DropDownList, the next step is to populate the TextBox in the form with the other user information based on the selected item from the DropDownList. Here's the code block below: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;pre class="csharpcode"&gt;       &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; PopulateFormFieds(&lt;span class="kwrd"&gt;int&lt;/span&gt; userID) {
            UserManager userMgr = &lt;span class="kwrd"&gt;new&lt;/span&gt; UserManager();
            var result = userMgr.GetUserDetail(userID);
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (result.Count &amp;gt; 0) {
                var user = result.First();
                tbFirstName.Text = user.FirstName;
                tbLastName.Text = user.LastName;
                tbContactNumber.Text = user.ContactNumber;
            }
            &lt;span class="kwrd"&gt;else&lt;/span&gt; {
                &lt;span class="rem"&gt;//NO RECORDS FOUND.&lt;/span&gt;
                tbFirstName.Text = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
                tbLastName.Text = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
                tbContactNumber.Text = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
            }
            
        }


        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ddlUser_SelectedIndexChanged(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e) {
            PopulateFormFieds(Convert.ToInt32(ddlUser.SelectedItem.Value));
        }&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;As you can see the code above is very straight forward. The PopulateFormFieds() is aboviously a method for populating the TextBox with the user detail information. The first line in the method creates an instance of the UserManager class and call the method GetUserDetail and pass along the userID as the parameter. We then store the results in the result variable and check if the result count is greater than 0. If it is greater than 0 then that means there are data returned based on the query we issued and fill the TextBox with the corresponding field data. 
      &lt;br /&gt;

      &lt;br /&gt;

      &lt;br /&gt;Here's the output below after selecting an item from the DropDownList:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef9.jpg" width="406" height="331" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;That's it! I hope someone find this post useful.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:cc561889-6976-465d-91dd-dc60c581db69" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Entity+Framework" rel="tag"&gt;Entity Framework&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/144687.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework---fetching-and-populating-the-data-in-the.aspx</guid>
            <pubDate>Mon, 04 Apr 2011 11:41:14 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/144687.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework---fetching-and-populating-the-data-in-the.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/144687.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/144687.aspx</trackback:ping>
        </item>
        <item>
            <title>Entity Framework - Inserting Data to Database</title>
            <link>http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework----inserting-data-to-database.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Few months ago I wrote a series of articles regarding how to Insert, Update, Fetch and Delete data in the form using LINQ to SQL. You can view the series of articles below:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2010/03/11/inserting-data-to-database-using-linq-to-sql.aspx"&gt;Inserting Data to Database using LINQ to SQL&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2010/03/11/fetching-data-from-database-and-populating-fields-in-the-form.aspx"&gt;Fetching Data from Database and Populating fields in the Form using LINQ to SQL&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2010/05/05/editing-updating-and-deleting-data-in-the-form-using-linq.aspx"&gt;Editing, Updating and Deleting Data in the Form using LINQ to SQL&lt;/a&gt;           &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;In this article I'm going to demonstrate the basics on how to work with MS Entity Framework. Basically in this part I'm going to show you how to add data from the WebForm to the database using the MS Entity Framework.        &lt;br /&gt;        &lt;br /&gt;As an overview, ADO.NET Entity Framework (EF) is an object-relational mapping (ORM) framework for the .NET Framework.EF enables developers to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema. The goal is to decrease the amount of code and maintenance required for data-oriented applications. Entity Framework applications provide the following benefits:         &lt;br /&gt;        &lt;br /&gt;    * Applications can work in terms of a more application-centric conceptual model, including types with inheritance, complex members, and relationships.         &lt;br /&gt;    * Applications are freed from hard-coded dependencies on a particular data engine or storage schema.         &lt;br /&gt;    * Mappings between the conceptual model and the storage-specific schema can change without changing the application code.         &lt;br /&gt;    * Developers can work with a consistent application object model that can be mapped to various storage schemas, possibly implemented in different database management systems.         &lt;br /&gt;    * Multiple conceptual models can be mapped to a single storage schema.         &lt;br /&gt;    * Language-integrated query (LINQ) support provides compile-time syntax validation for queries against a conceptual model.         &lt;br /&gt;        &lt;br /&gt;        &lt;br /&gt;You can refer the link below for more details about Entity Framework: &lt;/span&gt;&lt;/span&gt;&lt;a href="http:// http://msdn.microsoft.com/en-us/library/aa697427%28v=vs.80%29.aspx"&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;http://msdn.microsoft.com/en-us/library/aa697427%28v=vs.80%29.aspx&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;strong&gt;STEP 1: Setting up the project&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;For this demo, I'm going to use Visual Studio 2010. Now lets go ahead and fire up Visual Studio and then select File -&amp;gt; New Project -&amp;gt; Visual C# -&amp;gt; Web - ASP.NET Web Application and then name the application the way you want and then click OK to generate the default files.         &lt;br /&gt;        &lt;br /&gt;&lt;strong&gt;STEP 2: Adding the EDMX file&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;Now add a new folder under the root of the application and name it as "Model" and within that folder add another folder and name it as "DB". The application structure would look something like below:         &lt;br /&gt;        &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef1.jpg" width="329" height="296" /&gt;         &lt;br /&gt;        &lt;br /&gt;After that right click on the "DB" folder and select Add -&amp;gt; New Item -&amp;gt; Data -&amp;gt; ADO.NET Entity Data Model. See below screenshot for more clearer view:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef2.jpg" width="537" height="333" /&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Noticed that I named the entity as "SampleModel" just for the purpose of this demo. You may want to name it to a more appropriate name based on your requirements but for this example let's just use "SampleModel". Now click Add to continue and on the next step select "Generate from database" and click Next. On the next step you can connect or browse to the database that you want to use in the application and test the connection string by clicking on the "Test Connection" button and if it succeeds then you can continue by clicking OK and then Next.        &lt;br /&gt;        &lt;br /&gt;Note that in this example I created a simple database called "DeveloperReport.mdf" and added it into the application's App_Data folder and use it as our database for this demo. See the screen shot below:         &lt;br /&gt;        &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef3.jpg" width="536" height="423" /&gt;         &lt;br /&gt;        &lt;br /&gt;On the next step we can add the table(s), views or stored procedures that we want to use in the application by selecting the checkbox. See below screenshot:         &lt;br /&gt;        &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef4.jpg" width="536" height="469" /&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Noticed that I've only selected the "SysUser" table. This is because we are going to use this table for doing insert and we don't need anything else. Now click on Finish button to generate the entity model for you. See the screenshot below:        &lt;br /&gt;        &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef5.jpg" width="205" height="285" /&gt;         &lt;br /&gt;        &lt;br /&gt;What happens there is that EF will automatically generates the Business object for you within the Entity Data Model(EDM) that we have just created and let you query against it.The EDM is the main gateway by which you retrieve objects from the database and resubmit changes.         &lt;br /&gt;        &lt;br /&gt;&lt;strong&gt;STEP 3: Setting up the form&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;Since we already have our model in place then let's go ahead a set up our GUI. Let's add a new webform by right clicking on the project and select Add -&amp;gt; New Item -&amp;gt; Web -&amp;gt; Webform using Master Page and then click Add. For the simplicity of this demo I just set up the GUI like below:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;  &lt;div style="width: 600px; overflow: auto"&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebAppDemo.WebForm1" %&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Content1"&lt;/span&gt; &lt;span class="attr"&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class="kwrd"&gt;="HeadContent"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Content2"&lt;/span&gt; &lt;span class="attr"&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class="kwrd"&gt;="MainContent"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h1&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Add New&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h1&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;First Name&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbFirstName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Last Name&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbLastName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Contact Number&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbContactNumber"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Login ID&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbLoginID"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Password&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="tbPassword"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;TextMode&lt;/span&gt;&lt;span class="kwrd"&gt;="Password"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="lblMessage"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="btnAdd"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Add"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;&lt;strong&gt;STEP 4: Creating the Object Manager class&lt;/strong&gt; 

      &lt;br /&gt;

      &lt;br /&gt;The next step that we are going to do is create an object manager class that would handle the (CRUD operations) create,update,fetch and delete of a certain table. The purpose of this class is to separate the actual data opertions from our code behind and to have a central class for handling insert,update,fetch and delete operations. But please note that in this example I'm only doing the insert part in which a user can add new data from the GUI to the database. I'll talk about how to do the update,fetch and delete in EF in my next article. So this time we'll just focus on the insertion part first. 

      &lt;br /&gt;

      &lt;br /&gt;Now right click on the "Model" folder and add a new class by selecting Add -&amp;gt; Class and since we are going to manipulate the SysUser table then we will name the class as "UserManager". Here's the code block for the "UserManager.cs" class: 

      &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;
      &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwrd"&gt;using&lt;/span&gt; WebAppDemo.Model.DB;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WebAppDemo.Model {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; UserManager {

        &lt;span class="kwrd"&gt;private&lt;/span&gt; DeveloperReportEntities dre = &lt;span class="kwrd"&gt;new&lt;/span&gt; DeveloperReportEntities();

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Add(&lt;span class="kwrd"&gt;string&lt;/span&gt; firstName, &lt;span class="kwrd"&gt;string&lt;/span&gt; LastName,&lt;span class="kwrd"&gt;string&lt;/span&gt; contactNumber, &lt;span class="kwrd"&gt;string&lt;/span&gt; loginID, &lt;span class="kwrd"&gt;string&lt;/span&gt; password) {
            SysUser user = &lt;span class="kwrd"&gt;new&lt;/span&gt; SysUser();
            user.FirstName = firstName;
            user.LastName = LastName;
            user.ContactNumber = contactNumber;
            user.SysUserLoginID = loginID;
            user.SysPassword = password;

            dre.AddToSysUsers(user);
            dre.SaveChanges();
        }
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;br /&gt;&lt;strong&gt;STEP 5: Adding new data to database&lt;/strong&gt; 

&lt;br /&gt;

&lt;br /&gt;Now switch to the WebForms code behind part and create a method that would call the object manager class to do insertion. Here's the code block below: 

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;/p&gt;

&lt;div style="width: 600px; overflow: auto"&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; WebAppDemo.Model;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WebAppDemo {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; WebForm1 : System.Web.UI.Page {

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; InsertUserInfo(&lt;span class="kwrd"&gt;string&lt;/span&gt; firstName, &lt;span class="kwrd"&gt;string&lt;/span&gt; LastName, &lt;span class="kwrd"&gt;string&lt;/span&gt; contactNumber, &lt;span class="kwrd"&gt;string&lt;/span&gt; loginID, &lt;span class="kwrd"&gt;string&lt;/span&gt; password) {
            UserManager userMgr = &lt;span class="kwrd"&gt;new&lt;/span&gt; UserManager();
            userMgr.Add(firstName, LastName, contactNumber, loginID, password);
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Page_Load(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e) {

        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; btnAdd_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e) {
            &lt;span class="rem"&gt;//You may validate the data first here&lt;/span&gt;
            &lt;span class="rem"&gt;//But assuming the data that was supplied are correct and valid&lt;/span&gt;
            InsertUserInfo(tbFirstName.Text,
                           tbLastName.Text,
                           tbContactNumber.Text,
                           tbLoginID.Text,
                           tbPassword.Text);

            lblMessage.Text = &lt;span class="str"&gt;"Data Inserted!"&lt;/span&gt;;

        }
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;Note that I have never included some basic validations on the form such us data inputs, data formats and loginID and password &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;validation &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: tahoma"&gt;because I want to keep this demo as simple as possible. In real projects you should ensure that all data inputs are validated before sumbitting it to the database. 
      &lt;br /&gt;

      &lt;br /&gt;Here's the sample screen shot when viewing the page in the browser: 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef6.jpg" width="481" height="411" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;And here's the screenshot of the SysUser table after inserting the data from the WebForm: 

      &lt;br /&gt;

      &lt;br /&gt;&lt;img alt="" src="/images/geekswithblogs_net/dotNETvinz/ef7.jpg" width="504" height="95" /&gt; 

      &lt;br /&gt;

      &lt;br /&gt;That's it! I hope someone find this post useful!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:741c11b4-7758-4de4-b22a-19eb7695aa87" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Entity+Framework" rel="tag"&gt;Entity Framework&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/C%23" rel="tag"&gt;C#&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/dotNETvinz/aggbug/144679.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vincent Maverick Durano</dc:creator>
            <guid>http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework----inserting-data-to-database.aspx</guid>
            <pubDate>Mon, 04 Apr 2011 03:59:48 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/dotNETvinz/comments/144679.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/dotNETvinz/archive/2011/04/04/entity-framework----inserting-data-to-database.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/dotNETvinz/comments/commentRss/144679.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/dotNETvinz/services/trackbacks/144679.aspx</trackback:ping>
        </item>
    </channel>
</rss>
