Tag | ASP.NET MVC Posts

It has been over a year since the last time I updated my list of Florida technical communities and a lot has changed since then. Joe Healy, our Florida Microsoft Developer Evangelist, maintains a list for each of the main areas in Florida, but this only covers the .NET-focused groups. Taking what he has started, I have put together a similar list (based on the information Joe maintains) that covers the other technical communities that I know of. If you are part of a technical user group community ...
In this blog post, we will take a quick look at the new MVC 3 project options as well as the pretty sharp Razor View Engine (not suitable for shaving :) ). Based on a nice Stackoverflow post, it seems that MVC 3/Razor will only be supported in Visual Studio 2010/.Net 4.0. This is great as it will give developers yet another good selling point to argue for upgrading to .Net 4.0. Creating a new ASP.Net MVC 3 project Prior to ASP.Net MVC 3 Beta, Selecting “New Project” in VS 2010 yielded two templates ...
Scott Guthrie’s team just unveiled a beta release of several projects. In the next few days, I will be exploring each of them, but given that I am preparing for my October 28, 2010 SoFla PDC 2010 talk on MVC, I will probably experiment with the latest ASP.Net MVC 3 Beta first as it will be my main focus at the local PDC event. To get to enjoy the latest and greatest ASP.Net MVC 3, we first would need to uninstall the MVC 3 Preview if we had that already installed. This can be simply done by going ...
Sam Abraham (Me) will have the privilege of speaking with Joe Homnick at the Gold Coast .Net User Group October 2010 meeting about The Open Data Protocol (OData). For this talk, I plan to demonstrate how the Open Data Protocol can be leveraged in an ASP.Net MVC solution to consume data feeds using JQuery. Speaking at the Gold Coast .Net User Group brings back good memories. It was at the Gold Coast group that I first met Alex Funkhouser, Sherlock Technology’s President a little over a year ago. At ...
Sam Abraham (Me) had the great pleasure of attending and participating at the SW FL .Net Code Camp which took place on September 25, 2010 at Florida Gulf Coast University, Estero, FL. I spoke at two sessions: “ASP.Net MVC” and “SSIS for C# Developers”. I was pleasantly surprised with the high turnout at the MVC session despite the fact that it was scheduled early on that Saturday (8:45 AM). This highlights the growing interest in ASP.Net MVC and its related suite of tools such as Razor, Web Pages ...
Has it ever happened to you that you are sitting with your laptop and need to do something with a computer on your local network and it turns out that computer is in a sleep mode and you have to walk to it and move the mouse or press some key to wake it up and then come back to your laptop to do what you initially wanted to do with it? Indeed, if you have to walk to a computer rather than remotely access it than the benefit of having local network is already somewhat undermined. My particular situation ...
TOPIC: BDD and SpecFlow This is a presentation on how to use BDD and SpecFlow to build software driven by specifications. It will include a brief overview of how SpecFlow works and how to define specifications, followed by a compare and contrast with standard TDD. It will finish with real-world SpecFlow examples of successes and failures. PRESENTER: Darren Cauthon Darren Cauthon is a developer with over eight years of experience, half of which have been on the .Net platform. He currently works for ...
Sam Abraham (Me) will be speaking at The South West Florida .Net Code Camp taking place on Saturday, September 25th, 2010. I will be sharing two topics: “SSIS for C# Developers” and “Introduction to ASP.Net MVC”. With so many great speakers covering a wide variety of today’s hottest technologies, the event is bound to be a great learning experience for all. Looking forward to attending as many talks as my brain can take. :) See you all there! --Sam Abraham Here are the abstract for my scheduled talks: ...
Long time didn’t post any articals about the Windows Azure since I was fully busy with our first cloud-based platform – XLR8 (codename: Xalent). Just a week ago my chief architect Ray asked me to try to deploy our platform on Windows Azure. There should something need to be changed and one of them is, on Azure we cannot use the local file system to store anything which was uploaded by the end users. There are two reasons: All files under the web role project will be treated as one package. This means ...
I have been meaning to write this post for quite some time now. Finally, I have a moment to spare and express my thoughts. I have been programming in .NET for several years and I have never felt the shortage of excitement until now. Unfortunately, when I think about the future of .NET I see nothing on the horizon. ASP.NET MVC has been pulling me back into the .NET community but this will end some time soon. Every time I start building the application I am faced with same stuff over and over again. ...
Quick Link: download ASP.NET MVC Preview 1 It is a an exciting time to be a web developer. There are lots of new technologies from Microsoft coming out for the browser (IE9 changes everything), in the area of tooling (the brand new WebMatrix) and for the server – with ASP.NET MVC 3 Preview 1 released today (27th July 2010). Download and install side by side with MVC 2 If you have Visual Studio 2010 (The FREE Web Developer edition is fine) then you can safely download ASP.NET MVC Preview 1 (download ...
Yesterday (22nd July 2010) was mvcConf – “the Virtual ASP.NET MVC Conference”. This was an ambitious undertaking by the community to deliver a three track, 20+ session conference for FREE using Live Meeting. And… it worked great. A big well done to everyone involved. It was particularly interesting to me and my team as we are hoping/planning to do similar online conferences in UK time around technologies such as the Windows Azure Platform and Windows Phone 7 – and attending yesterday gave me the ...
Most simple forms we write, especially in LOB applications, are repetitive sections of inputs and/or displays. Take a look at an exmaple from the MVC Music Store sample, the album editor template, notice anything repetitive? <%@ Import Namespace="MvcMusicStore"%> <%@ Control Language="C#" Inherits="System.Web.Mvc.Vi... %> <script src="/Scripts/MicrosoftAjax... type="text/javascript">&... <script src="/Scripts/MicrosoftMvcA... ...
Back in January, Jeremy Miller posted a nice article on HtmlTags: Shrink your Views with FubuMVC Html Conventions. We were immediately in love with the idea and have spent several months adapting the conventions to work with our ASP.Net MVC applications. I was having a conversation with Ryan recently, reflecting on how far we’ve come and how we had no vision of that when we first read that article. I want to share some of that, so I will be working on a series of blog posts to show “What we are doing ...
Technorati Tags: ASP.NET MVC,mvcconf I took the day off work today to "attend" mvcConf: the Virtual ASP.NET MVC Conference, and had a great time. Thanks to all of the presenters and organizers of the conference. It was a huge success, and I'm sure that like me, most of the attendees hope there will be another soon. It was amazing how smoothly everything went. There were only one session cancellation and very few technical difficulties (I experienced none, but people in the chat rooms reported a few ...
This week, Scott Guthrie, Corporate Vice President at Microsoft’s Developer Division, announced, via blog post, the early Beta release of a new tool called WebMatrix. WebMatrix is a free developer tool that enables Web development geared toward what might I might call Markup-and-Script developers (more on that in a minute). And although WebMatrix draws upon technologies already, or soon to be, present in the fuller ASP.NET Web development platform and the Visual Studio integrated development environment ...
Technorati Tags: jQuery,ASP.NET,ASP.NET MVC,conferences I was excited yesterday to learn of two upcoming virtual online conferences about topics in which I'm very interested. The first one I heard about was mvcConf, the Virtual ASP.NET MVC Conference - Thursday, July 22. From the website: mvcConf is a virtual conference focused on one thing. Writing awesome applications on top of the ASP.Net MVC framework. The event will be free to attend, and your brain will explode from taking in so much hard core ...
Technorati Tags: .NET,ASP.NET,ASP.NET MVC I'm rewriting a "classic ASP" (that term always makes me laugh - Just 'cause it's old don't make it "classic") application in ASP.NET MVC 2. There's an existing user authorization table in the database, so I want to keep using that for authorization determination. I created a custom class inheriting from FilterAttribute and implementing IAuthorizationFilter: 1: public class DuffAuthorizeAttribute : FilterAttribute, IAuthorizationFilter 2: { 3: public DuffAuthorizeAttribute(params ...
Technorati Tags: Scott Hanselman,diabetes Scott Hanselman is on a mission to raise $50,000 dollars for the ADA Diabetes Walk 2010. $30,000 has been raised so far. He needs our help to raise the remaining $20,000. Are you a "Hanselfan"? If you: have been entertained and educated by the Hanselminutes podcast have a well-thumbed copy of "Professional ASP.NET" on your desk (heck, you could use the dang thing for a desk, it's so huge) ==> or have read one of Scott's other books have learned about a ...
I recently had the privilege of taking part of a conversation about available blog engines with some of our Microsoft Community Leaders. I since got interested in finding out more about available .Net-based extensible blogging engines. Two days ago, I came across a link about Oxite, a codeplex ASP.Net MVC-based mature open source blogging engine (http://oxite.codeplex.com). While the Oxite project is no longer active, its source remains available and downloadable. Additionally, the future holds great ...
Technorati Tags: .NET,ASP.NET,ASP.NET MVC,MvcContrib,localization In a prior post, I blogged about creating a custom class inheriting from System.Web.Mvc.DataAnnotati... to provide localized display names for my models. I was disappointed to find that the MvcContrib grid doesn't use the metadata provider for column names - it just splits "Pascal-case" property names into words (e.g. "FromDate" to "From Date") if a name hasn't been explicitly assigned. public string DisplayName ...
Technorati Tags: .NET,ASP.NET,ASP.NET MVC,Microsoft Unity In my current ASP.NET MVC project, I'm focused on testability and programming to interfaces rather than concrete implementations, so I have a ton of interfaces. I'm using the Microsoft Unity IOC Container, so my dependency injection initialization code looked like this: 1: using System; 2: using System.Collections.Generic; 3: using System.Reflection; 4: using Duff.Localization; 5: using Duff.Database; 6: using Microsoft.Practices.Unity; 7: ...
Technorati Tags: ASP.NET,ASP.NET MVC I wish I had discovered this before part 19. I've got some catching up to do… Evan Nagle's working / blogging / joking / cartooning his way through building an ASP.NET MVC 2 web site in what looks like the .NET world's answer to Why's (Poignant) Guide to Ruby: http://www.weirdlover.com/2... Looks like a bit more entertaining ride than NerdDinner or the Music Store ...
Videos of presentations from NDC 2010 are now available at: http://streaming.ndc2010.no... It looks like there are about 48 available. I'm particularly looking forward to: Mads Torgersen: "C# Quo Vadis?" (followed by a discussion on the future of C# with Mads, Eric Lippert, Gafter and Jon Skeet) Roy Osherove: "Beautiful Teams & Leaders" Greg Young: "5 reasons why projects using DDD fail" Jon Skeet: "If I Ruled the World - C# 5.0 According to Jon" Eric Evans: "What I've learned About DDD Since ...
Technorati Tags: ASP.NET,ASP.NET MVC,MvcContrib I started looking at the MvcContrib grid earlier this week, and it looks promising. At the Kansas City Developer’s Conference today, Javier Lozano showed a demo using JqGrid. When I asked Javier about JqGrid, he said I might want to look at Telerik’s ASP.NET MVC Extensions Grid. Any recommendations would be welcome. (If you can give me a grid comparing the capabilities of each, that would be great ;) ...
When I was working on the TalentOn project (Promotion in MSDN Chinese) I was asked to implement a functionality that makes the top menu items highlighted when the currently viewing page was in that section. This might be a common scenario in the web application development I think. Simple Example When thinking about the solution of the highlighted menu items the biggest problem would be how to define the sections (menu item) and the pages it belongs to rather than making the menu highlighted. With ...
Technorati Tags: ASP.NET,ASP.NET MVC,localization In my last post, I talked bout creating a custom class inheriting from System.ComponentModel.Displ... to retrieve display names from resource files: [LocalizedDisplayName("Reme... public bool RememberMe { get; set; } That’s a lot of work to put an attribute on all of my model properties though. It would be nice if I could intercept the ASP.NET MVC code that analyzes the model metadata to retrieve display names to make it automatically ...
Technorati Tags: ASP.NET,ASP.NET MVC,localization The ASP.NET MVC HTML helper methods like .LabelFor and .EditorFor use model metadata to autogenerate labels for model properties. By default it uses the property name for the label text, but if that’s not appropriate, you can use a DisplayName attribute to specify the desired label text: [DisplayName("Remember me?")] public bool RememberMe { get; set; } I’m working on a multi-language web site, so the labels need to be localized. I tried pointing ...
Technorati Tags: ASP.NET,ASP.NET MVC,T4MVC I’m working on my first ASP.NET MVC project, and I really, really like MVC. I hate all of the “magic strings”, though: <div id="logindisplay"> <% Html.RenderPartial("LogOnUs... %> </div> <div id="menucontainer"> <ul id="menu"> <li><%=Html.Action... Dinner", "Index", "Dinners")%></li> <li><%=Html.Action... Dinner", "Create", "Dinners")%></li> <li><%=Html.Action... ...
The .NET Framework version 4 includes enhancements for ASP.NET 4 in targeted areas. Visual Studio 2010 and Microsoft Visual Web Developer Express also include enhancements and new features for improved Web development. This document provides an overview of many of the new features that are included in the upcoming release. This topic contains the following sections: ASP.NET Core Services ASP.NET Web Forms ASP.NET MVC Dynamic Data ASP.NET Chart Control Visual Web Developer Enhancements Web Application ...
ERB is the default view templating system used by Ruby on Rails. Haml is an alternative templating system that uses whitespace to represent document structure. The example from the haml website shows the following equivalent markup: Haml ERB #profile .left.column #date= print_date #address= current_user.address .right.column #email= current_user.email #bio= current_user.bio <div id="profile"> <div class="left column"> <div id="date"><%= print_date %></div> <div id="address"><%= ...
I had a really fun evening doing “my final” EF 4.0 session last night (26th May 2010) at GL.NET based out of Gloucester (although secretly I made it into a IronRuby and Windows Azure session). They are a great crowd and Jimmy makes for a fantastic host + it is a very nice venue (Symantec offices in Gloucester, lots of parking, good room etc) + free pizza + free SWAG + trip to pub afterwards (the topics were very varied!). What more could you ask for? The next session is June 16th and will be on multi-tenanted ...
Its been long due I was planning to write an article on creating some useful ASP.NET MVC application. I have code named it "DailyJournal". Its a simple application which allows creation of multiple activities and assign tasks to these activities. Its' kind of "Yet another Task/Todo application". The credentials which you can use with the attached demo application is shown below. Collapse Copy Code User Name : admin Password : admin123 Framework/Libraries Used ASP.NET MVC jQuery + jQuery UI (for ajax ...
RenderAction method had been introduced when ASP.NET MVC 1.0 released in its MvcFuture assembly and then final announced along with the ASP.NET MVC 2.0. Similar as RenderPartial, the RenderAction can display some HTML markups which defined in a partial view in any parent views. But the RenderAction gives us the ability to populate the data from an action which may different from the action which populating the main view. For example, in Home/Index.aspx we can invoke the Html.RenderPartial(“MyParti... ...
I was working through some scenarios recently with Azure and Silverlight. I immediately decided a quick walk through for setting up a Silverlight Application running in an ASP.NET MVC 2 Application would be a cool project. This walk through I have Visual Studio 2010, Silverlight 4, and the Azure SDK all installed. If you need to download any of those go get em? now. Launch Visual Studio 2010 and start a new project. Click on the section for cloud templates as shown below. After you name the project, ...
My two latest books are out! Professional ASP.NET 4 in C# and VB Professional C# 4 and .NET 4 From the back covers: Take your web development to the next level using ASP.NET 4 ASP.NET is about making you as productive as possible when building fast and secure web applications. Each release of ASP.NET gets better and removes a lot of the tedious code that you previously needed to put in place, making common ASP.NET tasks easier. With this book, an unparalleled team of authors walks you through the ...
An upgraded article and solution had been posted here. I migrated the project to ASP.NET MVC 4 with some features added. - Upgraded to ASP.NET MVC 4, Visual Studio 2012. - Moved the solution to a separated project. - Moved the procedure originally executed in base controller's ExecuteCore to a separated class. Now can use the this solution without needing inherit from the localization base controller. - Implemented the localization resource provders so that can use any data source (database, XML ...
Here is a quick walk through of setting up your Silverlight 4 development environment. The first assumed step is that you have Visual Studio 2010 already installed and any appropriate patches. Then download the following in order and install each. Silverlight 4 Tools RC2 for Visual Studio and Silverlight 4 RTW Expression Blend 4 Release Candidate Silverlight Toolkit - Not necessary, but lots of good bits in this download. WCF RIA Services - This is also not necessary, but you should grab it just ...

Microsoft Senior Program Manager, Joe Stagner, has released his first 3 ASP.NET MVC for the Rest of Us Videos. I like the way he helps you learn ASP.NET MVC by building bridges between ASP.NET MVC concepts & ideas and ASP.NET WebForms concepts & ideas which you may already be comfortable working with. Good job Joe.

Have a day. :-|

Following up on my prior “gems post” is another nugget I found in the Visual Studio 2010 and .NET Framework 4 Training Kit. ASP.NET MVC has established quite a bit of momentum in the ASP.NET development community since it was introduced in early-ish 2009 though I’m sure there are many developers who haven’t had the time or opportunity to find out what it is, not to mention learn how to use it. If you’re one of those “I’ve heard of it but I’m not sure what it really is” developers then I suggest you ...
In this post I look into the code smell that is HTML literals and show how we can refactor these pesky strings into a friendlier and more maintainable model. The Problem When I started writing MVC applications, I quickly realized that I built a lot of my HTML inside HtmlHelpers. As I did this, I ended up moving quite a bit of HTML into string literals inside my helper classes. As I wanted to add more attributes (such as classes) to my tags, I needed to keep adding overloads to my helpers. A good ...
I have recently started writing another book. The topic of this book is ASP.NET MVC. This book differs from my previous book in that rather than working towards building one project from end to end – this book will demonstrate specific topics from end to end. It is a recipe book (hence the cookbook name) and will be part of the Packt Publishing cookbook series. An example recipe in this book might be how to consume JSON, creating a master /details page, jquery modal popups, custom ActionResults, ...
With MVC2 officially released, I was involved in a few conversations regarding the feasibility of upgrading existing MVC 1.0 projects to quickly leverage the newly introduced MVC features. Luckily, Microsoft has proactively addressed this question for both Visual Studio 2008 and 2010 and many online resources discussing the upgrade process are a "Bing/Google Search" away. As I will happen to be speaking about MVC2 and Visual Studio 2010 at the Ft Lauderdale ArcSig .Net User Group Meeting on April ...
One of my colleague and friend, Robin is playing and struggling with the ASP.NET MVC 2 on a project these days while I’m struggling with a annoying client. Since it’s his first time to use ASP.NET MVC he was meetings with a lot of problem and I was very happy to share my experience to him. Yesterday he asked me when he attempted to insert a <br /> element into his page he found that the page was rendered like this which is bad. He found his <br /> was shown as a part of the string rather ...
Have you ever needed to detect what part of the application is currently being viewed? This might be a bigger issue if you write a lot of shared/partial views or custom display or editor templates. Another scenario, which is the one I encountered when I first started down this path, is when you have some type of menu and you’d like to be able to determine which item represents the current page so you can highlight it in some way. A simple example is the menu that is created as part of the default ...
One of the things that might be surprising in the LINQ Distinct standard query operator is that it doesn’t automatically work properly on custom classes. There are reasons for this, which I’ll explain shortly. The example I’ll use in this post focuses on pulling a unique list of names to load into a drop-down list. I’ll explain the sample application, show you typical first shot at Distinct, explain why it won’t work as you expect, and then demonstrate a solution to make Distinct work with any custom ...
Recently, I started working on a new ASP.NET MVC 2 project and I wanted to reuse the data access (LINQ to SQL) and business logic methods (WCF RIA Services) that had been developed for a previous project that used Silverlight for the front-end. I figured that I would be able to instantiate the various DomainService classes from within my controller’s action methods, because after all, the code for those services didn’t look very complicated. WRONG! I didn’t realize at first that some of the functionality ...
*Moved to: Scott Guthrie in GlasgowLast week Scott Guthrie was in Glasgow for his new Guathon tour, which was a roaring success. Scott did talks on the new features in Visual Studio 2010, Silverlight 4, ASP.NET MVC 2 and Windows Phone 7. Scott talked from 10am till 4pm, so this can only contain what I remember and I am sure lots of things he discussed just went in one ear and out another, however I have tried to capture at least all of my Ohh’s and Ahh’s. Read more...Follow my new blog on http://blog.hinshelwood.com ...
After deciding I wanted to dive full-on into the world of ASP.NET MVC 2, I began doing some research into what would be the best way to support some of my required AJAX functionality on this platform. The result of these efforts was a barrage of options – many of which required completely different JScript infrastructure than what I planned to go forward with. As I’ve been delighted with jQuery so far, I began tossing out all approaches that didn’t natively leverage it… Thus, I planned to resist ...
In this post, we are going to look into implementing lists into our twitter application and also about enhancing the data grid to display the status messages in a pleasing way with the profile images. Twitter lists are really cool feature that they recently added, I love them and I’ve quite a few lists setup one for DOTNET gurus, SQL Server gurus and one for a few celebrities. You can follow them here. Now let us move onto our tutorial. 1) Lists can be subscribed to in two ways, one can be user’s ...