LA.NET [EN]

February, 2009Archive

Feb 27

2011-01-12 11:50:59

Read the rest of this entry »

Feb 25

Code contract is out

Posted in C#, Design by Contract       Comments Off on Code contract is out

Check the announcement here and the site is here.

Read the rest of this entry »

Feb 24

Paul do Mar mini-vacations

Posted in Trivia       Comments Off on 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 […]

Read the rest of this entry »

Feb 19

The MVC framework: using the IDataErrorInfo interface

Posted in ASP.NET, MVC       Comments Off on The MVC framework: using the IDataErrorInfo interface

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, […]

Read the rest of this entry »

Feb 18

I love SQUASH

Posted in Trivia       1 Comment »

And unfortunately, I still can’t play it (due to back injury). Ok, here’s why I do love this game!

Read the rest of this entry »

Feb 18

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 […]

Read the rest of this entry »

Feb 17

The MVC platform: updating your objects

Posted in ASP.NET, MVC       Comments Off on The MVC platform: updating your objects

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 […]

Read the rest of this entry »

Feb 12

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 […]

Read the rest of this entry »

Feb 09

The MVC platform: the new anti forgery token

Posted in ASP.NET, MVC       Comments Off on The MVC platform: the new anti forgery token

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 […]

Read the rest of this entry »

Feb 08

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 […]

Read the rest of this entry »

Feb 07

Protected: Something bad happened today

Posted in Trivia       Comments Off on Protected: Something bad happened today

There is no excerpt because this is a protected post.

Read the rest of this entry »

Feb 07

Snowing again

Posted in Trivia       1 Comment »

Yep, more snow…which is way too cool! I’ve uploaded some pics to my facebook. Check the snow album here.

Read the rest of this entry »

Feb 06

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 […]

Read the rest of this entry »

Feb 06

The MVC framework: wrapping up authorization

Posted in ASP.NET, MVC       Comments Off on The MVC framework: wrapping up authorization

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 […]

Read the rest of this entry »

Feb 05

The MVC platform: integrating authentication and authorization in your apps

Posted in ASP.NET, MVC       Comments Off on The MVC platform: integrating authentication and authorization in your apps

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 […]

Read the rest of this entry »

Feb 04

The MVC platform: interacting with the ActionMethodSelectorAttributes

Posted in ASP.NET, MVC       Comments Off on The MVC platform: interacting with the ActionMethodSelectorAttributes

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 […]

Read the rest of this entry »

Feb 03

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.

Read the rest of this entry »

Feb 03

The MVC platform: more on dropdowns and listboxes

Posted in ASP.NET, MVC       Comments Off on The MVC platform: more on dropdowns and listboxes

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, […]

Read the rest of this entry »

Feb 03

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 […]

Read the rest of this entry »

Feb 02

MVC platform: filling form’s fields from collection is broken for strongly typed views

Posted in ASP.NET, MVC       Comments Off on MVC platform: filling form’s fields from collection is broken for strongly typed views

Problems and workaround described here.

Read the rest of this entry »

Feb 02

The MVC platform: more breaking changes in my posts

Posted in ASP.NET, MVC       Comments Off on The MVC platform: more breaking changes in my posts

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 […]

Read the rest of this entry »

Feb 02

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 […]

Read the rest of this entry »

Feb 01

The MVC platform: the TagBuilder class

Posted in ASP.NET, MVC       Comments Off on The MVC platform: the TagBuilder class

2011-01-12 11:49:01

Read the rest of this entry »