Custom Sorting with N-Layer Design Classes and the GridView

Posted by: Imar Spaanjaars at Wednesday, June 13, 2007 7:25:57 PM in: ASP.NET 2.0
Over the past couple of months I received a number of questions related to sorting with the classes from my N-Layer Design article series and the GridView. The good thing is: it isn't that hard; it's just that you need to know how to do it....
Read on ...

Half a Million Articles Read on Imar.Spaanjaars.Com!!

Posted by: Imar Spaanjaars at Tuesday, May 01, 2007 8:10:37 PM in: Imar's Blogs
Today my web site has reached a very interesting milestone: It registered the 500,000th article view. A good moment to look back a bit, and see what happened with my site during the past few years.
Read on ...

VB.NET Version of the Code for the N-Layer Design Articles Now Available

Posted by: Imar Spaanjaars at Tuesday, April 24, 2007 9:56:39 PM in: Imar's Blogs
My on-line friend Peter has been so kind to translate the code for the Contact Manager Application from my articles about N-Layer Design to Visual Basic.NET.
Read on ...

New Orcas Preview Release Available

Posted by: Imar Spaanjaars at Thursday, April 19, 2007 8:40:52 PM in: Imar's Blogs
In case you hadn't noticed yet: Beta 1 of Visual Studio Orcas is out....
Read on ...

Fun With Linq!

Posted by: Imar Spaanjaars at Friday, March 16, 2007 4:30:33 PM in: C#

Quite often I have discussed the impossibility of joining data from a database with that of the file system. I discussed it with my team members, mentioned it in trainings and wrote about it recently in this article.

Being able to join data from a database with other data from a file system could be very useful though.

Read on ...

Getting in Touch With Me

Posted by: Imar Spaanjaars at Tuesday, March 13, 2007 9:33:00 PM in: Imar's Blogs
Ever since I posted my first article on this web site, on September 22 2003, I have enjoyed feedback from you, my reader. For me, it was the best (and often only) way to get in touch with you, and accept article requests, questions and general feedback about my site.
Read on ...

Building Layered Web Applications with Microsoft ASP.NET 2.0 - Part 3

Posted by: Imar Spaanjaars at Sunday, February 25, 2007 3:17:03 PM in: ASP.NET 2.0

Update!! - I have written a new series on N-Layer design targeting ASP.NET 4.5 and Entity Framework 5. You can check out the new series here.

Update!! 12-24-2008 - I have written a new series on N-Layer design as a major follow up to this one. It builds on the foundation created in this first series, but digs much deeper into concepts like Validation, Sorting, Paging, Concurrency and Security. You can check out the new series here.

Update!! 04-25-2007 - There is now also a VB.NET version of the code available for download. You find the download at the end of this article. For more information about the translation, check out this blog post.

This is part three of the article series "Building Layered Web Applications" that shows you how to build N-Layer applications with Microsoft ASP.NET 2.0. These articles teach you how to design, build and use custom business objects in your web application. The target audience for this series are developers that are ready to make the switch from using SqlDataSource controls to ObjectDataSource controls with custom business objects. Experience with ASP.NET 2 and C# is necessary while some knowledge about object oriented design certainly helps.

Part one dealt with the design of the application: what business objects do you need to fulfill the requirements of the application. What should these objects be capable of and how do they look. How do these business objects interact with other parts of the system? Part two showed you how to code the classes that were designed in part one. You saw how to implement the data access methods and database code and how the various classes were able to work together. You also saw how to use the API to programmatically create contact persons and their contact data and save those in a database. However, writing explicit code to work with your business objects isn't always fun, and can be a cumbersome task.

Therefore, this article (part three) deals with using the business objects in a web application. You'll see how to use the ASP.NET controls like the GridView in conjunction with the business objects. You'll see how you can build pages that allow you to list, create, edit and delete your contact persons and their contact data, like e-mail addresses and phone numbers.

If you haven't read part one or two yet, you should really read them first, as this article uses many concepts that have been explained in part one and two. The entire series (including this current article) can be found here:

The article uses a SQL Server 2005 Express database which is easy to use in development scenarios. However, the downloads for this series also come with the T-SQL scripts to recreate the database in SQL Server 2000 or SQL Server 2005. You'll find the download link at the end of this article. Besides the forementioned SQL scripts and database, the download also contains the full source for the demo application in C#.

Read on ...

Firebug and FireFox Crashing when Viewing Pages on my Site that Contain Google Ads

Posted by: Imar Spaanjaars at Saturday, February 24, 2007 12:15:53 PM in: Imar's Blogs

Update!! 02-27-2007 - I just got an e-mail from my team member Marcel who pointed me to this article: http://forums.asp.net/thread/1501276.aspx

Funny thing is, I was already using the code from that article to fix an issue with Ajax RC. Turns out that with the RTM release this code is no longer necessary, and additionally, now seems to crash FireFox when using Firebug. I removed the offending JavaScript and everything is fine now. Thank you Marcel!!

If you still have issues browsing this site with Firefox, please let me know.

Over the past couple of weeks, I received a number of e-mails from people reporting that their FireFox browser crashed when browsing my site.

Read on ...

Building Layered Web Applications with Microsoft ASP.NET 2.0 - Part 2

Posted by: Imar Spaanjaars at Saturday, February 17, 2007 4:29:09 PM in: ASP.NET 2.0

Update!! - I have written a new series on N-Layer design targeting ASP.NET 4.5 and Entity Framework 5. You can check out the new series here.

Update!! 12-24-2008 - I have written a new series on N-Layer design as a major follow up to this one. It builds on the foundation created in this first series, but digs much deeper into concepts like Validation, Sorting, Paging, Concurrency and Security. You can check out the new series here.

Update!! 04-25-2007 - There is now also a VB.NET version of the code available for download. You find the download at the end of this article. For more information about the translation, check out this blog post.

Update!! 04-24-2007 - Fixed a bug in the stored procedure that deletes a Contactperson, based on feedback from reader csharpdev. This also affects the downloadable code for this article, which now also has the update applied.

This is part two of the article series "Building Layered Web Applications" that shows you how to build N-Layer applications with Microsoft ASP.NET 2.0. These articles teach you how to design, build and use custom business objects in your web application. The target audience for this series are developers that are ready to make the switch from using SqlDataSource controls to ObjectDataSource controls with custom business objects. Experience with ASP.NET 2 and C# is necessary while some knowledge about object oriented design certainly helps. The design I am going to show you in these articles is a simplified version of a design you would use in a real world application. It doesn't feature all the necessary functionality your application needs, but instead focuses on the underlying concepts.

Part one dealt with the design of the application: what business objects do you need to fulfill the requirements of the application. What should these objects be capable of and how do they look. This article (part two) continues where the previous article stopped: it shows you how to code the classes that were designed in part one. You'll see how to implement the data access methods and database code and you'll learn how you can connect these classes. Part three then deals with using the business objects in a web application. You'll see how to make use of the out-of-the-box ASP.NET 2.0 controls together with the business objects coded in this part.

If you haven't read part one yet, you should really read it first, as this article uses many concepts that have been explained earlier. Afterwards, check out part three where you'll see the concepts from this article in an actual web site. The entire series (including this current article) can be found here:

The article uses a SQL Server 2005 Express database which is easy to use in development scenario's. However, the downloads for this series also come with the T-SQL scripts to recreate the database in SQL Server 2000 or SQL Server 2005. You'll find the download link at the end of this article. Besides the aforementioned SQL scripts and database, the download also contains the full source for the demo application in C#

Read on ...

Cool Sonic Youth Videos

Posted by: Imar Spaanjaars at Wednesday, February 07, 2007 9:45:01 PM in: Imar's Blogs
I have always been a big fan of Sonic Youth, so I was very pleased when my good friend Joost pointed me to one of their coolest live videos on YouTube.
Read on ... 12345678910111213141516171819202122232425262728293031