<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Joe Knows ASP.NET</title><subtitle type="html">Joe Cartano&amp;#39;s blog on ASP.NET</subtitle><id>http://blogs.msdn.com/b/joecar/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/joecar/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2009-06-22T18:55:00Z</updated><entry><title>ASP.NET MVC 3 Tools Update, now with Drop-Down Lists!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2011/04/15/asp-net-mvc-3-tools-update.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2011/04/15/asp-net-mvc-3-tools-update.aspx</id><published>2011-04-14T23:00:36Z</published><updated>2011-04-14T23:00:36Z</updated><content type="html">&lt;p&gt;The &lt;a href="http://www.microsoft.com/web/gallery/install.aspx?appid=MVC3"&gt;ASP.NET MVC 3 Tools Update&lt;/a&gt; includes EF Code First as a preinstalled NuGet package. You can use EF Code First to generate models and then scaffold them with the updated Add Controller tool. Of course, you don’t have to use EF Code First to take advantage of the updated scaffolding in the ASP.NET MVC 3 Tools Update. Lets take a look at some of the improvements. Below is a screenshot of the new and improved Add Controller dialog. I am about to scaffold a controller and CRUD views for the Employee entity in my pre-existing Entity Model. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/0412.image_5F00_50F2D46C.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/2543.image_5F00_thumb_5F00_3F16409F.png" width="713" height="465" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After adding the EmployeeController a fully CRUD scaffolded controller is added to my application along with the familiar Create, Delete, Details, Edit, and Index views. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/7851.image_5F00_3863371C.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/4212.image_5F00_thumb_5F00_587E43D9.png" width="438" height="377" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;If you dive in to the EmployeeController code, one interesting thing to note is that the ViewBag now contains SelectLists for the foreign keys of Employee. Dynamic Data is being used to get the foreign key information from the model and this information is then used to scaffold drop-down lists in the views rather than plain old textboxes. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/0728.image17_5F00_1A152171.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/3652.image17_5F00_thumb_5F00_05FC04E8.png" width="1171" height="267" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;One thing to note is that if there is no &lt;strong&gt;DisplayColumn&lt;/strong&gt; attribute Dynamic Data displays the first string property of the entity for foreign keys by default. Since I did not want the default behavior I specified that “LastName” should be the display column for Contacts. This is why in the screenshot above you see that “LastName” is specified as the dataTextField for Contacts but Employees and Salespersons will display the less friendly ID. Now when I run the application and attempt to edit the information of an Employee, the Contact property is displayed with a drop down list rather than a simple textbox and I can edit the contact by choosing a new value from the existing contacts! &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/3618.image_5F00_2E1212BC.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/6355.image_5F00_thumb_5F00_59C2DCB8.png" width="332" height="765" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Below is the corresponding markup that generated the drop-down list on the above page. You can see that the DropDownList helpers are used to display foreign keys of the entity. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/7026.image_5F00_32F4C678.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/1663.image_5F00_thumb_5F00_680155A8.png" width="630" height="181" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Adding drop-down list support for foreign keys is a pretty cool feature of the ASP.NET MVC 3 Tools Update and is available no matter how you choose to create your models. There are many more improvements in the ASP.NET MVC 3 Tools update and I’ll try to cover a few more of them in the coming weeks.&lt;/p&gt;  &lt;p&gt;Hope this helps you get your ASP.NET MVC 3 applications up and running quickly!&lt;/p&gt;  &lt;p&gt;Joe Cartano | ASP.NET&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10154229" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author><category term="Joe Cartano" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Joe+Cartano/" /><category term=".NET" scheme="http://blogs.msdn.com/b/joecar/archive/tags/-NET/" /><category term="Tooling" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Tooling/" /><category term="Web Platform Installer" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Web+Platform+Installer/" /><category term="ASP.NET MVC 3" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET+MVC+3/" /><category term="NuGet" scheme="http://blogs.msdn.com/b/joecar/archive/tags/NuGet/" /></entry><entry><title>Add the ASP.NET MVC 3 Code Templates to your application with Nuget</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2011/01/06/add-the-asp-net-mvc-3-code-templates-to-your-application-with-nuget.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2011/01/06/add-the-asp-net-mvc-3-code-templates-to-your-application-with-nuget.aspx</id><published>2011-01-06T19:55:44Z</published><updated>2011-01-06T19:55:44Z</updated><content type="html">&lt;h3&gt;&lt;strong&gt;Before (Manual)&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;ASP.NET MVC uses &lt;a href="http://msdn.microsoft.com/en-us/library/bb126445.aspx"&gt;T4&lt;/a&gt; templates to scaffold Views and Controllers through the Add View and Add Controller dialogs. A lot of people probably don’t know that these templates can be customized quite easily to generate whatever markup you prefer. Really, the only pain point is finding the code templates on your machine and copying them with the expected folder structure into your project. Unfortunately, this can be a bit of a hassle because ASP.NET MVC uses a custom T4 host to scaffold views and controllers but Visual Studio associates the files with the built-in T4 host. This means that the built in T4 engine will run for each .tt file that you add to your project. It will also run again when you save the .tt files. You can manually clear this custom tool and delete all of the aspx/cshtml files the built-in host generates and begin customizing the templates.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/3404.image_5F00_241CC2B4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/8780.image_5F00_thumb_5F00_421AD0A8.png" width="830" height="465" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;&lt;strong&gt;After (With &lt;a title="Nuget" href="http://nuget.codeplex.com/"&gt;Nuget&lt;/a&gt;)&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;The &lt;a title="Nuget" href="http://nuget.codeplex.com/"&gt;Nuget&lt;/a&gt; packages, &lt;strong&gt;Mvc3CodeTemplatesCSharp&lt;/strong&gt; and &lt;strong&gt;Mvc3CodeTemplatesVB&lt;/strong&gt;, will add all of the view and controller templates that ship with ASP.NET MVC 3 to your application. Also, the DTE will clear the custom tool on each template that is added to your project so you can begin editing the files immediately. The one gotcha is that the built-in t4 host does run once before the DTE can clear the custom tool so you will still see one spurious T4 related error in your error list until you re-open the project. Make sure to install the package from the command line since the DTE needs to run.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/8713.image_5F00_2CBD1B40.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/5657.image_5F00_thumb_5F00_687CB3F3.png" width="1278" height="216" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After installing the package you should see something similar to the screenshot below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/1351.image_5F00_1A082189.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-15-69-metablogapi/2437.image_5F00_thumb_5F00_67A44E09.png" width="1275" height="672" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;You can see all of the logic used by ASP.NET MVC 3 to scaffold views and modify it as you please. Then just run the Add-View tool to add a view with the new markup. If you don’t want these templates to override the default templates installed on your machine you will need to rename or delete the templates in your project that you do not want to take precedence. I’ll post more on this in the coming weeks.&lt;/p&gt;  &lt;p&gt;Hope this helps you get started editing the ASP.NET MVC 3 Code Templates!&lt;/p&gt;  &lt;p&gt;Joe Cartano | ASP.NET&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10112647" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author><category term="ASP.NET MVC" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET+MVC/" /><category term="ASP.NET" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET/" /><category term="Visual Studio" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Visual+Studio/" /><category term="Joe Cartano" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Joe+Cartano/" /><category term="MVC" scheme="http://blogs.msdn.com/b/joecar/archive/tags/MVC/" /><category term=".NET" scheme="http://blogs.msdn.com/b/joecar/archive/tags/-NET/" /><category term="ASP.NET MVC 3" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET+MVC+3/" /><category term="NuGet" scheme="http://blogs.msdn.com/b/joecar/archive/tags/NuGet/" /></entry><entry><title>Visual Studio 2010 MVC 2 Upgrade Wizard </title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2010/04/14/visual-studio-2010-mvc-2-upgrade-wizard.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2010/04/14/visual-studio-2010-mvc-2-upgrade-wizard.aspx</id><published>2010-04-14T15:15:00Z</published><updated>2010-04-14T15:15:00Z</updated><content type="html">&lt;H5 class=posthead&gt;(Cross post from Visual Web Developer team site: &lt;A href="http://blogs.msdn.com/webdevtools/archive/2010/04/13/visual-studio-2010-mvc-2-upgrade-wizard.aspx"&gt;http://blogs.msdn.com/webdevtools/archive/2010/04/13/visual-studio-2010-mvc-2-upgrade-wizard.aspx&lt;/A&gt;)&lt;/H5&gt;
&lt;P&gt;Prior to the RTM release of Visual Studio 2010, the only way to upgrade an ASP.Net MVC 1 application to ASP.Net MVC 2 was to use Eilon Lipton’s &lt;A href="http://weblogs.asp.net/leftslipper/archive/2009/10/19/migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx" mce_href="http://weblogs.asp.net/leftslipper/archive/2009/10/19/migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx"&gt;tool&lt;/A&gt;. With the release of Visual Studio 2010 you will now be able to open your MVC 1 projects in Visual Studio 2010 and upgrade them to ASP.Net MVC 2 projects. Also, you can upgrade the target framework of the project to 4.0 or continue to target the 3.5 framework. When you first open an ASP.Net MVC 1 application in Visual Studio 2010, you will see the familiar Visual Studio Conversion Wizard.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_thumb_1.png" width=1027 height=643 mce_src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_thumb_1.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ASP.Net MVC specific code runs during this wizard and updates all System.Web.MVC references from version 1 to version 2. The wizard also updates the version numbers in the project’s Web.config and the Views folder’s Web.config. The project guid is also updated to the MVC 2 project guid so you will now be able to take advantage of Add Area while working on your application.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_8.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_thumb_3.png" width=1030 height=556 mce_src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;If you upgrade your project to 4.0, the project system will also upgrade System.Web.Routing and System.Web.Abstractions to 4.0 and modify the references in the project’s Web.config. At this point, you should be able to build and run your project.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_10.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_thumb_4.png" width=1356 height=851 mce_src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;What about class libraries and Visual Studio Test projects in my solution?&lt;/P&gt;
&lt;P&gt;Unless you are using Visual Web Developer Express, the ASP.Net MVC upgrade wizard code does not upgrade your class libraries to the 4.0 framework, so make sure to upgrade them in the project properties if you choose to target the 4.0 framework when upgrading your ASP.Net MVC Application. Also you should check to make sure that class library references to System.Web.Abstractions and System.Web.Routing point to the version in the gac, now that these two assemblies are part of the 4.0 framework. Visual Studio Test projects do not support multi-targeting but for solutions with ASP.Net MVC applications they can be migrated to 4.0 along with your MVC Application.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If you are using C#, your VS Test project will upgrade to 4.0 regardless of whether you upgrade your ASP.Net MVC 2 Application and your project will build and run whether you target 3.5 or 4.0. &lt;BR&gt;
&lt;LI&gt;&lt;STRONG&gt;Visual Basic test projects will prompt for an upgrade to 4.0 so choose according to which framework you wish to target for your ASP.Net MVC app. In other words, don’t upgrade your app to 4.0 and not upgrade your test project or vice versa.&lt;/STRONG&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_16.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_thumb_7.png" width=533 height=412 mce_src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/VisualStudio2010MVC2UpgradeWizard_F42B/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hope this helps you get your ASP.Net MVC apps up and running in Dev10!&lt;/P&gt;
&lt;P&gt;Joe Cartano | Visual Web Developer&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9995910" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author><category term="ASP.NET MVC" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET+MVC/" /><category term="ASP.NET" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET/" /><category term="Visual Studio" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Visual+Studio/" /><category term="Joe Cartano" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Joe+Cartano/" /><category term="MVC" scheme="http://blogs.msdn.com/b/joecar/archive/tags/MVC/" /><category term=".NET" scheme="http://blogs.msdn.com/b/joecar/archive/tags/-NET/" /><category term="MVC RTM" scheme="http://blogs.msdn.com/b/joecar/archive/tags/MVC+RTM/" /><category term="Web Platform Installer" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Web+Platform+Installer/" /><category term="NUnit" scheme="http://blogs.msdn.com/b/joecar/archive/tags/NUnit/" /></entry><entry><title>On PHP</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2010/04/08/on-php.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2010/04/08/on-php.aspx</id><published>2010-04-08T00:43:00Z</published><updated>2010-04-08T00:43:00Z</updated><content type="html">&lt;P&gt;I just finished a two day PHP training with Keith Casey (Casey Software)&amp;nbsp;with Blue Parabola and a key contributor to web2project and and thought I would write down my thoughts and notes before I forget everything. Here are some quick observations:&lt;/P&gt;
&lt;P&gt;PHP:&lt;/P&gt;
&lt;P&gt;PHP is all about getting stuff done and there are many different ways to do many different things. This is good and bad. There is no central source of information such as MSDN for PHP developers. The best way of getting up to date on the latest information is through your local user group and by contributing to projects and getting code reviews. Many junior developers do not come from a CS background and will do things the wrong way the first time. They are dependant on senior devs showing them the ropes and chewing them out for mistakes.&lt;/P&gt;
&lt;P&gt;Apps:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PHP in my opinion kills anything on the Microsoft stack as far as getting pre-built app up and running. We watched a wordpress install from dreamhost with an added theme and a google SEO plug in go from start to finish in about five minutes. There are many other viable apps that can be configured in a similar manner such as the well known Joomla, Drupal and others. Configuring these apps is a matter of clicking one or two checkboxes and hitting go. Dead simple and very impressive. Web PI is our best response for pre built apps and it is ideal for setting up a .Net or PHP environment&amp;nbsp;but we do not have anywhere near the hoster support or widespread app adoption that PHP has. I think the Orcard project is a great response here and hopefully this app can develop a strong community following and is dead simple to set up and configure from a hoster such as discountASP or GoDaddy.&lt;/P&gt;
&lt;P&gt;Groups:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The PHP community can be broken down into four groups.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Designers: mainly work in Photoshop and might have some knowledge of HTML and CSS&lt;/LI&gt;
&lt;LI&gt;Themers: limited knowledge of HTML and CSS, responsible for setting theming pre-built applications&lt;/LI&gt;
&lt;LI&gt;Configurers: limited knowledge of PHP, some javascript knowledge, responsible for configuring plugins for pre-built applications&lt;/LI&gt;
&lt;LI&gt;Developers: varying knowledge of PHP, can write plugins, write from scratch, contribute to open source projects&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Developers are small in amount to the the other three groups because one plugin can be utilized by many many configurers. A typical model for a mom and pop bakery is to charge 500 bucks or so and set up a quick and dirty site with some limited theming and perhaps a logo. Developer does not need to be involved here and is also not cost feasible. For Orchard to compete with this model, developing a viable plug in ecosystem will be huge. Drupal rule #34 is that there is always a plug in for that. This means in the vast majority of cases, no real developer/programming experience is required for CMS and Blog application development. At this point, I don't think there is a .Net solution that can say the same thing. &lt;/P&gt;
&lt;P&gt;The Language:&lt;/P&gt;
&lt;P&gt;In general, PHP is not elegant. Developers with a computer science background would probably prefer using a framework such as ASP.Net MVC, Rails, or Django. However, we did not explore CakePHP much but I think it might help smooth out a lot of the rough stuff. We looked at developing a log in page with client and server side validation and there did not seem to be standard design patterns in PHP that would help a new developer avoid mistakes and securtiy vulnerabilities. It seemed that the only way to write good code is to write poor code and get criticized by more experienced developers. A goal of frameworks is to steer developers in the right direction, for instance, separation of concerns is the path of least resistance in ASP.Net MVC and client and server validation are both very clean. With plain PHP, the main development process for new developers&amp;nbsp;is to search for a snippet online, tweak it for your needs and be done with it. Again, I would like to see CakePHP because I have heard a lot of cool things about it. &lt;/P&gt;
&lt;P&gt;The IDE:&lt;/P&gt;
&lt;P&gt;Developers might prefer NetBeans or Eclipse, a big factor is where the developer is coming from. For instance, a Java developer would probably use Eclipse and a Perl developer would probably use EMACS. Must have features are code completion/intellisense, go to definition, deployment, source code control integration, coloring, find all references, possibly javascript intellisense/debugging, and debugging in general. Interstingly, many PHP developers do not use a debugger, XDebug seems to have some pretty cool features but many developers think the feedback loop is quick enough with print statements and var dumps and don't want to be weighed down with a debugger. There are also some other cool tools that count duplicated code and measure code complexity but most novice developers do not use these tools.&lt;/P&gt;
&lt;P mce_keep="true"&gt;The Community:&lt;/P&gt;
&lt;P mce_keep="true"&gt;The top guys in PHP contibute to mulitple open source projects and often run large teams of developers as their main job. Contributing to open source projects is useful for major players like Facebook because they need the changes anyway. Contributions generally are made for the purpose of scratching an itch. For the smaller guys, being a key contributer on an open source project is a source of reputation in the community and a built in resume. Furthermore, it allows the developer to charge higher rates to deploy the app and customize it for a customer. It was very interesting to hear so many details about the open source model and why it works. There are a lot of positives such as strong community and constant improvement, but also some negatives such as the lack of a central communication channel and the prevalence of projects that are dead, stalled or bug ridden. There is a strong survivorship bias around major PHP apps such as Drupal and Joomla, there are hundreds of apps that have died out and these have been in development for five plus years and have only somewhat recently been taking off. This makes me think that getting Orchard to this level will take a lot of hard work but it is an absolute must to have any chance of competing with PHP for the audience below developers. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;Overall:&lt;/P&gt;
&lt;P mce_keep="true"&gt;I learned a lot of fascinating things just by listening to Keith's experiences and opinons on PHP. Being able to ask a top PHP expert anything and have him share information on the PHP world was a great experience. I realized I wouldn't want to start writing PHP code unless I had a need for it because it is messy but if I wanted to get a prototypical site up and running PHP is the choice today because it is good enough and there is a tremendous ecosystem for extending PHP apps.&amp;nbsp;To really compete with PHP on this front,&amp;nbsp;Web Platform Installer, Orchard, and a .Net&amp;nbsp;hosting story that allows deployment from the hoster will be crucial.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;Joe Cartano | Visual Web Developer&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9992109" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author><category term="ASP.NET MVC" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET+MVC/" /><category term="Joe Cartano" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Joe+Cartano/" /><category term="PHP" scheme="http://blogs.msdn.com/b/joecar/archive/tags/PHP/" /></entry><entry><title>Single Project Add View in ASP.Net MVC 2 Preview 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2009/10/16/single-project-add-view-in-asp-net-mvc-2-preview-2.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2009/10/16/single-project-add-view-in-asp-net-mvc-2-preview-2.aspx</id><published>2009-10-16T00:35:00Z</published><updated>2009-10-16T00:35:00Z</updated><content type="html">&lt;H5 class="posthead pageTitle"&gt;Cross Post from &lt;A href="http://blogs.msdn.com/webdevtools/archive/2009/10/15/single-project-add-view-in-asp-net-mvc-2-preview-2.aspx" mce_href="http://blogs.msdn.com/webdevtools/archive/2009/10/15/single-project-add-view-in-asp-net-mvc-2-preview-2.aspx"&gt;http://blogs.msdn.com/webdevtools/archive/2009/10/15/single-project-add-view-in-asp-net-mvc-2-preview-2.aspx&lt;/A&gt;&lt;/H5&gt;
&lt;P&gt;Last week we released &lt;A href="http://haacked.com/archive/2009/10/01/asp.net-mvc-preview-2-released.aspx" mce_href="http://haacked.com/archive/2009/10/01/asp.net-mvc-preview-2-released.aspx"&gt;ASP.Net MVC 2 Preview 2&lt;/A&gt; for Visual Studio 2008 Sp1. In the box support for single project areas is now included and the Add View tool has been modified to streamline this scenario. A walkthrough that creates two simple single project areas can be found &lt;A title=http://msdn.microsoft.com/en-us/library/ee461420(VS.100).aspx href="http://msdn.microsoft.com/en-us/library/ee461420(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee461420(VS.100).aspx"&gt;here&lt;/A&gt;. If you follow the steps in the walkthrough you will notice that Add Controller and Add View are now available in the single project areas in your ASP.Net MVC 2 Preview 2 application. Here are some screenshots that show off the tooling changes.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_28.png" mce_href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_28.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_13.png" width=489 height=614 mce_src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_13.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Right-Clicking the Controllers folder of any single project area (Areas –&amp;gt; Blog –&amp;gt; Controllers) will invoke the familiar Add Controller dialog.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_30.png" mce_href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_30.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_14.png" width=1359 height=581 mce_src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_14.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The new controller will be added to the Controllers folder of the single project area rather than the Controllers folder of the ASP.Net MVC 2 Preview 2 Application.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_34.png" mce_href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_34.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_16.png" width=1359 height=597 mce_src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_16.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Right-Click within an action method of the controller to add a view with the Add View dialog. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_36.png" mce_href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_36.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_17.png" width=1357 height=562 mce_src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_17.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The view will be added to Areas –&amp;gt; [Area Name] –&amp;gt; Views –&amp;gt; [Controller Name] when added from an action method in the controllers folder of an area. The Views folder structure will be created for you if it does not yet exist. Notice the intellisense error in the view that was added. This is because the area needs a Web.Config just like the Web.Config in the Application’s Views folder. We are working on simplifying some of these scenarios for the next release of ASP.Net MVC 2 but for now you should follow the steps in the &lt;A title=http://msdn.microsoft.com/en-us/library/ee461420(VS.100).aspx href="http://msdn.microsoft.com/en-us/library/ee461420(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee461420(VS.100).aspx"&gt;walkthrough&lt;/A&gt; to register your single project area so that it will work at run time.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_40.png" mce_href="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_40.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_19.png" width=1354 height=563 mce_src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/SingleProjectAddViewinAS.NetMVC2Preview2_A7EE/image_thumb_19.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Right click within the newly created area to find the familiar Go To Controller context menu item. The controller within your area also contains a Go To View context menu item. You can navigate back and forth between controllers and views in your area just as you can with controllers and views in the root of the ASP.Net MVC 2 application.&lt;/P&gt;
&lt;P&gt;Hope this helps you get started with single project areas!&lt;/P&gt;
&lt;P&gt;Joe Cartano | Visual Web Developer&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9907899" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author><category term="ASP.NET MVC" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET+MVC/" /><category term="ASP.NET" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET/" /><category term="Visual Studio" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Visual+Studio/" /><category term="Joe Cartano" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Joe+Cartano/" /><category term="Web" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Web/" /><category term="MVC" scheme="http://blogs.msdn.com/b/joecar/archive/tags/MVC/" /><category term=".NET" scheme="http://blogs.msdn.com/b/joecar/archive/tags/-NET/" /><category term="Tooling" scheme="http://blogs.msdn.com/b/joecar/archive/tags/Tooling/" /><category term="MVC RC" scheme="http://blogs.msdn.com/b/joecar/archive/tags/MVC+RC/" /></entry><entry><title>Random woes</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2009/08/01/random-woes.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2009/08/01/random-woes.aspx</id><published>2009-08-01T03:21:00Z</published><updated>2009-08-01T03:21:00Z</updated><content type="html">&lt;P&gt;I hate code like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; ProductsListView_ItemEditing(Object sender, ListViewEditEventArgs e)&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListViewItem item = ProductsListView.Items[e.NewEditIndex];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label dateLabel = (Label)item.FindControl(&lt;SPAN style="COLOR: maroon"&gt;&lt;SPAN style="COLOR: maroon"&gt;"DiscontinuedDateLabel"&lt;/SPAN&gt;&lt;/SPAN&gt;);&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (String.IsNullOrEmpty(dateLabel.Text))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt;;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;//Verify if the item is discontinued.&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateTime discontinuedDate = DateTime.Parse(dateLabel.Text);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (discontinuedDate &amp;lt; DateTime.Now)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Message.Text = &lt;SPAN style="COLOR: maroon"&gt;&lt;SPAN style="COLOR: maroon"&gt;"You cannot edit a discontinued item."&lt;/SPAN&gt;&lt;/SPAN&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Cancel = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductsListView.SelectedIndex = -1;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp; }&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Indexing into the item dictionary to find the correct row to edit, then finding specific controls and casting them really sucks, there must be a better way.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9854827" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>ASP.Net MVC V2 Preview 1 Released</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2009/07/31/asp-net-mvc-v2-preview-1-released.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2009/07/31/asp-net-mvc-v2-preview-1-released.aspx</id><published>2009-07-31T19:23:00Z</published><updated>2009-07-31T19:23:00Z</updated><content type="html">&lt;P&gt;ScottGu just posted details on all of the new features for ASP.Net MVC: &lt;A href="http://weblogs.asp.net/scottgu/archive/2009/07/31/asp-net-mvc-v2-preview-1-released.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2009/07/31/asp-net-mvc-v2-preview-1-released.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I haven't had much time to play with ASP.Net MVC lately as we are hard at work on Dev10 but there are some very cool looking features that I am excited to try out. First off, there is support for areas so that you can easily add functionality such as a blog or forum to your site, no tooling support yet though. Another feature that caught my eye was the improved scaffolding support. You can now specify an attribute, ScaffoldColumn, on a property and be able to control whether the Add View tool with generate markup for the property in your model. So if you were adding a view of type Product, you would apply ScaffoldColumn=false to the ID property if you did not want this to appear in the edit view. Cooler still is a ui hint attribute that allows you to specify the custom appearance of the scaffolding for a type. These templates are ascx files that live in convention based directories and can be completely customized. This is a nice hint of Dynamic Data creeping into ASP.Net MVC. All of these new features are making me want to start in on a new app building project to really get to know everything coming out the door. Stay tuned.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9854526" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author><category term="ASP.NET MVC" scheme="http://blogs.msdn.com/b/joecar/archive/tags/ASP-NET+MVC/" /></entry><entry><title>I am on twitter</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2009/07/13/i-am-on-twitter.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2009/07/13/i-am-on-twitter.aspx</id><published>2009-07-13T22:54:00Z</published><updated>2009-07-13T22:54:00Z</updated><content type="html">find me on twitter at &lt;A href="http://twitter.com/cartano" mce_href="http://twitter.com/cartano"&gt;twitter.com/cartano&lt;/A&gt;, I'll be making quick posts about mvc when I get the chance.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9832204" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>App Building Notes Day 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2009/06/24/app-building-notes-day-2.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2009/06/24/app-building-notes-day-2.aspx</id><published>2009-06-24T20:20:00Z</published><updated>2009-06-24T20:20:00Z</updated><content type="html">&lt;P&gt;Today I got a lot of work in with the ASP.Net data controls. I haven't really used these much before as I have been working almost solely with ASP.Net MVC for over a year. The three controls I played with were DetailsView, ListView, and FormView. FormView seems to be the equivalent of ListView but for just one item. DetailsView to me just seemed to be a really confusing version of FormView, no idea what to do with all of the different special fields that get generated. FormView is sweet because you can edit the look and feel in design view of Visual Studio, very cool. Why can't I do this with ListView? It seems like this should be do-able. &lt;/P&gt;
&lt;P&gt;FormView and ListView make a lot of sense to me because the markup is completely under my control so I understand what is going on. It would be very cool if there was a better way to edit the various templates that get generated. Each of these controls has an itemTemplate, editItemTemplate, alternateItemTemplate, and more. This doesn't seem like good design to me because a lot of the edits I make to itemTemplate will also be made to all the other templates. It looks to be common practice even to just comment out or delete the other templates. Instead, it would be cool if there was a master template and then for my alternateItemTemplate I could just inherit all of these fields but change my css, or for the edit template, make certain fields editable. This would be much more practical and readable.&lt;/P&gt;
&lt;P&gt;One other feature I was thinking about is a way to ensure style ends up in my site's css file. If I resize a button, maybe I could get an option to create a new style that is named buttonStyle, with the proper size attributes. The button's class attribute could then get set to this new style. What do you think? &lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9801781" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>App Building Notes Day 1: 10:55</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/joecar/archive/2009/06/22/app-building-notes-day-1-10-55.aspx" /><id>http://blogs.msdn.com/b/joecar/archive/2009/06/22/app-building-notes-day-1-10-55.aspx</id><published>2009-06-22T20:55:00Z</published><updated>2009-06-22T20:55:00Z</updated><content type="html">Okay, now on to the Answer page. Wait a second, how do I get the id of the question? In ASP.Net MVC the viewpage can be strongly typed with a question object. Do I need to parse a url? Access some data in a hidden field? Something else? Am I going to need to use URL Rewrite to clean up my urls? Ugh, this is a big point for ASP.Net MVC&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9798032" width="1" height="1"&gt;</content><author><name>joecar1</name><uri>http://blogs.msdn.com/joecar/ProfileUrlRedirect.ashx</uri></author></entry></feed>