Browse by Tags
All Tags »
MVC (
RSS)
You may have already experienced this, and I know that I experienced it before, but I experienced it again and forgot about it, and so I figure it would be a good time to blog about it. (When I blog, I remember things better). If you happen to use the...
One of the selling points of ASP.NET MVC 2.0 was the ability to unit test your action methods. Even though Microsoft made MVC flexible by making it easier to unit test than web forms, it isn't always easy to implement without writing a lot of code...
Html.Action is a method method that injects a response from the server directly into the UI. For instance, a controller can have two action methods, then inject the response directly into the UI from the other controller. Take a look at the sample form...
The freely available ASP.NET MVC framework by Telerik has added a new DatePicker control that works similarly to the RadDatePicker control in its ASP.NET AJAX framework. Below is a sample of that control: <% Html.Telerik().DatePicker().Name("Picker"...
The latest release of the open source Telerik ASP.NET MVC framework contains a new calendar control. This control functions similar to the ASP.NET AJAX calendar extender calendar, where it shows a month view, year view, and decade view, and responds to...
With the new various For methods in MVC (DisplayFor, TextBoxFor, etc.), these methods use a lambda to specify the fields to display/render. The following form below: <% Html.BeginForm(); %> <%= Html.ValidationSummary("The following errors...
Not only does MVC support server-side validation, client-side validation is a possibility too. Below is a sample form that sets up validation using client-side javascript. These client-side features are made available from the MicrosoftMvcValidation.js...
We are about to talk about client validation soon, but if you already know about it, read on; if not, wait until my next post and come back to this one :-). I'm writing this now because I just found it. If you use client validation, it's important...
ASP.NET MVC 1 had features built in that allowed you to validate content on the server-side, by specifying the elements to listen to validations for. These features have been enhanced so that you can use a lambda to specify the field to validate. Below...
In ASP.NET web forms, anytime an element within the form post contains an HTML tag (such as a <div> or any other tag), the input that's posted back to the server is validated, and an exception thrown, if that post contains any HTML tags within...
ASP.NET MVC 2 has provided a lot more options for displaying the data to the end user within your views. Here are a few of the options you have: Html.DisplayFor(i => i.FirstName) - DisplayFor renders the value of a property directly to the browser...
You may or may not have heard that ASP.NET MVC 2 has been released not too long ago. There are quite a few changes that come with ASP.NET MVC 2. In this article, I'm going to talk about some of the attribute changes related to MVC 2 now available...
Like web forms, MVC allows you to customize the building blocks for developing in MVC. Extension helpers are so easy to write because all it takes is an extension method like the following: public static class MyExtensions { public static string CustomHiddenField...
The Telerik MVC grid that comes with Telerik's MVC open source framework is awesome. It really rocks; it has a lot of the features that exists within the ASP.NET AJAX framework are also in this grid implementation. Not only that, it implements MVC...
ASP.NET MVC gives you a lot of options when you want to customize the way that ASP.NET MVC uses controllers. By default, ASP.NET uses a controller factory to handle MVC controller requests. A ControllerActionInvoker class, related to the controller, is...
ASP.NET MVC is a wonderful thing. One of the many great features is the ability to customize all of the .NET framework's code by swapping out one implementation and using another. One such instance is creating a custom view engine, which you can do...
The latest Telerik MVC set of components features a ScriptRegistrar component that's responsible for compressing or combining scripts into a single file. This compression utility is very easy to implement: to setup this component, use the following...
I've spent some time figuring out how to bridge the gap between web forms and ASP.NET MVC style of development. Just because the UI works differently, doesn't mean the actual framework works in a different way. If you use .NET 3.5 SP 1 for both...
The Controller class maintains a reference to the HttpContext property, and object of HttpContextBase. HttpContextBase is a great class because now we have an abstract way to replace default logic if needed (but generally that wouldn't be recommended...