Geeks With Blogs
Doug.Instance Improving the world one post at a time February 2012 Entries
The Enemy of My Friend Writes Bad MVC Controller Actions (Microsoft)
Recommendation: Don't use the same action names for get and (Ajax) post.I am always amazed at how bad Microsoft's code examples are. Code generated using the default templates in Visual Studio is not much better. To find out, create an empty project (pick your favorite type) and run static code analysis or FxCop and see how many warnings you see. For some real fun try running StyleCop. The default templates (and therefore commonly-used standard practices) are also not very good in my opinion. Consider ......

Posted On Thursday, February 16, 2012 11:29 PM

Problem: DropDownList Always Posts Blank Value in ASP.Net MVC 2
Consider the following code:<%= Html.DropDownList("State", new SelectList(new string[] { "","AK","AL","AR","AS","AZ"... "IL","IN","KS","KY","LA","M... "OH","OK","OR","PA","PR","P... %> Simple enough, right? Display a dropdown list with a value for each state. There is only one problem. The resulting ......

Posted On Tuesday, February 7, 2012 10:08 AM

Copyright © Doug Lampe | Powered by: