ASP.NET MVC Custom Authentication

The other day I was working on a sample application and was trying to come up with an efficient way to handle authentication and authorization.  I decided to consolidate this code by implementing custom principal and identity objects.  I find this approach very flexible and concise.  I wanted to document it for my own benefit …

Continue reading ‘ASP.NET MVC Custom Authentication’ »

More on Client Validation in ASP.NET MVC 3

I posted a while ago on asynchronous saves in MVC 3.  One thing to note that after the new content is loaded into the browser, client side validation is broken.  The reason being is that content is only parsed once by unobtrusive jQuery validation.  To fix this issue I would need to force the validator …

Continue reading ‘More on Client Validation in ASP.NET MVC 3’ »

Asynchronous Controllers Calls to Save Data in ASP.NET MVC 3

On a few occasions I wondered if it is possible to simulate Silverlight Save behavior in ASP.NET MVC.  What I mean is to asynchronously call a service from an edit form, asynchronously process the results, and update view based on saved data.  This process is a bit more complicated in ASP.NET MVC because we have …

Continue reading ‘Asynchronous Controllers Calls to Save Data in ASP.NET MVC 3’ »

More on Asynchronous Processing in ASP.NET MVC 3

In this post I would like to cover a couple of asynchronous patterns that are available in ASP.NET MVC and jQuery as it is used in MVC. In all my previous examples related to MVC 3.0 I used regular controller class that is automatically created for a developer when New Item –> Controller is chosen …

Continue reading ‘More on Asynchronous Processing in ASP.NET MVC 3’ »

Localizing / Customizing Entity Framework and ASP.NET MVC 3

In most demos that you see that involve entity framework code first and ASP.NET MVC 3, localization is not mentioned.  What if you want to make your data multi-language friendly?  Here is a simple example: I want to have title column to be at most 30 characters in my entity:     [StringLength(30)]     public string Title …

Continue reading ‘Localizing / Customizing Entity Framework and ASP.NET MVC 3’ »

Developing ASP.NET MVC 3 Application with EF CTP (Part 5)

In this post I will describe how to use MVC with a jquery grid control to display tabular data.  To start with, there is a number of grids available, some even integrate with ASP.NET MVC by providing an MVC assembly that generates the javascript for the grid.  One of these components in jqGrid.  I am …

Continue reading ‘Developing ASP.NET MVC 3 Application with EF CTP (Part 5)’ »

Developing ASP.NET MVC 3 Application with EF CTP (Part 4)

In this post I will examine a couple of things.  I am going to use jQuery calendar UI functionality to improve user interface.  I will also add client side validation to my input form. First, let’s add calendar control.  To do so, we have to download jQuery UI from .http://jqueryui.com/ Once this is completed, I …

Continue reading ‘Developing ASP.NET MVC 3 Application with EF CTP (Part 4)’ »

Developing ASP.NET MVC 3 Application with EF CTP (Part 3)

Today I will concentrate on refactoring existing code and adding other links to my application, such as delete and edit links. First things first, let’s do a bit of refactoring in advance of adding more views.  As I noticed, edit, delete and create views are the same with the exception of title for the submit …

Continue reading ‘Developing ASP.NET MVC 3 Application with EF CTP (Part 3)’ »