Jonas Stawski

Everything .NET and More

Traveling Through Time: from Delegates to Anonymous Methods to Lambda Expressions

We are very close to the release (February 2008) of Visual Studio 2008 and .NET 3.5 which will include both C# 3.0 and VB 9.0. Now we can look back in time and see where the .NET framework has taken us. Delegates In .NET 1.x we were introduced to d... [More]

Elite Club

I am very happy to announce that yesterday I have been added to a very elite club: the Microsoft MVP (Microsoft Most Valuable Professional) Club. If you don't believe me check it out for yourself: MVP Profile. I will also like to congratulate a cowor... [More]

Save documents with SQL Server and display them

So you have the need to let the user upload documents of any type to your server, but you don't know how to implement it. Some people say store them in the DB, others hate that and store the files on the file system. Which way do you go? Well, that d... [More]

Downloading multiple files from an FTP using wildcards

Recently someone asked me how to download multiple files from an FTP using wildcards. While I started looking for an answer I found out that is not possible using the FTPWebRequest class. The good news is that although downloading using wildcards is ... [More]

ConnectionString on a DataSet/DataTable with DataAdapter

UPDATE: I would not recommend using this approach. You shouldn't change any code that is automatically generated because it might get overwritten when modifying the designer. When you add a DataTable with a DataAdapter on a DataSet for a web app, Vi... [More]

Passing objects to the Object Data Source as parameters

This Object Data Source is very nice to use and almost all examples you see out there use primitive types as parameters. The question arrives when you want to pass an object as a parameter. You can't do it declaretively, so you have to do it on the c... [More]

String.Empty, null, Length, or String.IsEmptyOrNull ?

Every time i have to deal with strings (almost every time) I stop and wonder which way is really the fastest way to check for an empty string. Of course the string.Length == 0 check should be the fastest since Length is a property and there shouldn't... [More]

Set Focus on a TextBox and Set a Default Button

ASP.Net 2.0 has a new feature (I learned about it today) and I must say it’s a pretty cool feature one that every web developer had to deal with since the very beginning. Now you can set initial focus on your form and also set a default button ... [More]

Nullable Types ?!?!?!?!?!??!?!?!

Today I learned something new. Today I learned this new feature of .net 2.0 and that feature is Nullable Types. What are they? Basically they are a typed object of a primitive/value type that can hold a value or null/nothing. What's the difference be... [More]

N-Tier Application Architecture

Well, I just finished my N-Tier presentation and I can say it was the best presentation of all the 3 presentations I presented so far. The content was good, exciting, and cutting edge; and the crowd was the best I had. They laughed, and participated ... [More]