Raj Kaimal
If it ain't broke, make it better.
-
Code snippets for ASP.NET MVC2 in VS 2010
VS 2010 comes with ready made snippets which helps you save time while coding.
You insert a snippet by typing the name of the code snippet and hitting the Tab key twice. You can also use the following method if you wish to see a listing of snippets available. -
ASP.NET MVC Paging/Sorting/Filtering a list using ModelMetadata
This post looks at how to control paging, sorting and filtering when displaying a list of data by specifying attributes in your Model using the ASP.NET MVC framework and the excellent MVCContrib library.
Please see this post for a way of rendering the UI without using custom Sorting and Filtering attributes.
It also shows how to hide/show columns and control the formatting of data using attributes.
This uses the Northwind database. A sample project is attached at the end of this post. -
Securing an ASP.NET MVC 2 Application
This post attempts to look at some of the methods that can be used to secure an ASP.NET MVC 2 Application called Northwind Traders Human Resources.
The sample code for the project is attached at the bottom of this post.
We are going to use a slightly modified Northwind database. The screen capture from SQL server management studio shows the change. I added a new column called Salary, inserted some random salaries for the employees and then turned off AllowNulls. -
Easy way to update models in your ASP.NET MVC business layer
Brad Wilson just mentioned that the MVC Futures library has a static ModelCopier class with a CopyModel(object from, object to) static method. It uses reflection to match properties with the same name and compatible types.
-
How LINQ to Object statements work
This post goes into detail as to now LINQ statements work when querying a collection of objects.
-
Using delegates in C# (Part 2)
-
Using Delegates in C# (Part 1)
This post provides a very basic introduction of delegates in C#.
Part 2 of this post can be read here.
A delegate is a class that is derived from System.Delegate. It contains a list of one or more methods called an invocation list. When a delegate instance is “invoked” with the arguments as defined in the signature of the delegate, each of the methods in the invocation list gets invoked with the arguments. The code below shows example with static and instance methods respectively:
Static Methods -
Joins in LINQ to SQL
The following post shows how to write different types of joins in LINQ to SQL. I am using the Northwind database and LINQ to SQL for these examples.
-
Uploading and storing files in SQL using ASP.NET
Version: VS2008 SP1
-
Rendering an RDLC directly to the Response stream in ASP.NET MVC
The following post shows you how to render an RDLC (Client Report Definition File) in a MVC project. For this tutorial, I am using VS 2008 with MVC 2 Beta. I will also be using the priceless Northwind database and the report will contain a list of customers in the Northwind database.
A sample project zip file is provided at the bottom of this post.
We start off by creating an ASP.NET MVC 2 Empty Web Application.