2011-01-12 11:50:59
February, 2009Archive
Code contract is out
Check the announcement here and the site is here.
Paul do Mar mini-vacations
I’ve just returned from a mini-vacations at Hotel Paul do Mar. Even though the services could be a little better, it was a really nice place to say and relax (as you can see from these photos). Now I’m relaxed and ready for more work (which involves ending the LINQ book which is going to […]
On these last posts, we’ve seen how we can automatically fill an object from data submitted by a form. today, we’re going to take a look at how you can use the IDataErrorInfo and get automatic validation support. The first thing you should know is that IDataErrorInfo isn’t defined by the MVC fraemework. In fact, […]
I love SQUASH
And unfortunately, I still can’t play it (due to back injury). Ok, here’s why I do love this game!
Yesterday we’ve seen how we can use the UpdateModel/TryUpdateModel to update an instance of an existing object with data that was sent back to the server during the current request. At the time, I’ve mentioned the ValueProviderResult class and promised a more detailed analysis of it in a future post. Since I like to keep […]
Today we’re going to keep looking at the MVC platform and see how we can update an object by using the UpdateModel/TryUpdateModel methods. As we’ve seen, you can hook up an action method parameter with a binder. By doing this, the parameter will be instantiated and its properties’ values, automatically filled up from the HTTP […]
The latest release of the MVC platform introduces some classes which simplifies the code you need to write when you need to work with files. Today, we’re going to concentrate on the available options you can use when you need to download a file from an action method. We’ll start by looking at the base […]
Today we’re going to talk about a new feature introduced by the RC version of ASP.NET AJAX: the anti forgery token. The idea is render a hidden token which is validated during post back, ensuring that your app is protected against cross-site request forgery. Using this feature in your apps is as simple as calling […]
A few posts back, we’ve seen how we could use the AuthorizeAttribute to authorize the execution of a certain request. Today, we’ll look at another Filter which lets you validate the submitted input. Notice that we’re not talking about what I call domain validation (ie, we’re not checking if a field is null or if […]
Protected: Something bad happened today
There is no excerpt because this is a protected post.
Snowing again
Yep, more snow…which is way too cool! I’ve uploaded some pics to my facebook. Check the snow album here.
The MVC platform: handling errors
Yesterday, we’ve seen how we can handle authorization with the AuthorizeAttribute and how it integrates with the MVC pipeline and with the ASP.NET authentication infrastructure. Today we’re going to keep looking at existing filters and we’ll see how we can use the HandleErrorAttribute for handling exceptions that be raised during the handling of a MVC […]
In the last post we’ve seen how we can use the AuthorizeAttribute for authorizing a specific request. At the time, I’ve forgot to mention one detail regarding authorization. Besides using the AuthorizeAttribute or creating your own custom attribute for deciding who can access a specific action method, you can also create your custom authentication code […]
Today we’ll keep looking at the MVC framework and will see how the you can integrate authentication and authorization in your MVC applications. As we all know, authorization and authentication are different things, but they’re “connected”. I say this because whenever you need to decide if a user can execute a specific operation (ie, whenever […]
In the one of the latest”s posts, we’ve seen how we can use the AcceptVerbsAttribute to limit the valid HTTP methods that can be used for requesting the execution of an action method. Today we’ll take a closer look at how these items are used at runtime (ie, we’ll see how they are used internally […]
Karl Seguin on the MVP award
Karl has an interesting post with his ideas on the subject. Even though I’m still an MVP, I couldn’t agree more with his thoughts.
A few days ago I’ve talked about how you could use the helpers to generate dropdowns and listboxes. As I’ve said, you need to build a collection of SelectListItems in order to build these controls. What I didnt’ mentioned at the time was that there is an easy way to convert a custom collection (ie, […]
The AcceptVerbsAttribute was introduced in a previous release of the framework and its main objective is to let restrict an action method to certain HTTP method(s) (PUT, POST, etc). So, lets reuse the default web site that is created from the ASP.NET MVC and change the About action method default so that it can only […]
Problems and workaround described here.
A few days ago, I’ve talked about the BindAtrtibute class and on how you needed to set the Prefix to an empty string so that it wouldn’t look for data prefixed by a specific name. Since most people ended up setting the prefix attribute, the team changed the default behaviour and now the binding uses […]
Yesterday I’ve presented the main properties and methods of the TagBuilder class. Today, we’re going to reuse those ideas and build an extension method that renders an image inside an anchor (unfortunately, the image helper methods are defined in the futures assembly and the current release of the anchors won’t let you pass HTML for […]