Main Contents
Archives: '.NET'
Schotime @ June 13, 2009
.NET
|
Comments (4)
After a few months of using FluentValidation I asked its author Jeremy Skinner if it were possible to integrate this with xVal. At that time it was not possible because there were no easy way to access the properties needed by xVal. After submitting a few patches, we now have a solution which enables xVal [...]
Schotime @ May 11, 2009
.NET
|
Comments (1)
A few weeks ago I found the Fluent Validation framework by Jeremy Skinner. I needed to conditionally validate a model depending on an application setting. eg. Description field mandatory / not mandatory depending on the clients business requirements. I loved the simplicity of the framework and the separation from the model it provided.
Since then I [...]
Schotime @ March 31, 2009
.NET
|
Comments (0)
In a previous post I showed you how you can use xVal and the IDataErrorInfo class to add validation to your Asp.net MVC website. In this post I will extend that to Linq-to-Sql and the classes it generates.
The northwind database has a suppliers table. The info contained below is using that table with linq-to-sql.
After [...]
Schotime @ March 11, 2009
.NET
|
Comments (0)
In my last post I showed you how to use Validation attributes on your model for validation. Today I will show how you can create your own attributes that can provide custom validation for you.
To accomplish this we need to inherit from ValidationAttribute. We’ll create an attribute today that will only [...]
Schotime @ March 5, 2009
.NET
|
Comments (8)
I’ve been playing around with lots of different Validation concepts recently and I think I have come up with something that will be very useful. Hopefully you will also find it useful.
Firstly I have been looking at Steve Sanderson’s new open source project xVal and decided that it was a good place to start. I [...]
Schotime @ February 17, 2009
.NET
|
Comments (10)
The whole advantage with MVC over webforms is extensibility at every point. Extensibility, Extensibility, Extensibility.
Authorization is a very important and every web project has there own needs and requirements. Full customisation is paramount.
Here I will show you a simple way to customise your authorization.
In MVC attributes are used to protect a controller method, so we [...]
Schotime @ February 12, 2009
.NET
|
Comments (2)
In my previous post I used custom sql query and transformed the results into a nested class. However you may have overlooked way I got the data into a class. It quite easy and will work with all database connectors that implement IDbConnection.
Here is how its done. We use the DataContext that came with and [...]
Schotime @ January 22, 2009
.NET
|
Comments (1)
Back in the days of Classic ASP, when you had a one too many relationship displaying the data was pretty painful. You would do things like
var reference_number_old = "$##%@";
while (recordsExist)
{
[...]
Schotime @ October 18, 2008
.NET
|
Comments (8)
Yes…Finally…I have full control of my HTML again, but am still able to work with a great language like C#. MVC is here and its great. I’m absolutely loving it. But how the heck do you get it to work under IIS6. What if I want extensionless URL’s? Here is a few options for you.
Option [...]
Schotime @ July 27, 2008
.NET
|
Comments (8)
After my previous posts about returning data to the client as a JSON object, I decided to have a go at returning a generic Datatable/Dataset. This however is not as easy as simple returning a Datatable in your code behind method or web service. There is a solution though and here it is.
If you break [...]