Posted by: Imar Spaanjaars at Sunday, March 02, 2008 2:46:13 PM in:
.NET 3.5 General
Do you feel that the standard Split implementation of the String class is a bit awkward to use? Do you keep forgetting you have to declare a char array for the separator? And do you often need to split on multiple characters, like \r\n to split on a line break? In that case, read on. A simple extension method might fix that for you.
Read on ...
Posted by: Imar Spaanjaars at Monday, February 25, 2008 9:17:22 PM in:
Imar's Blogs
After almost a year of hard work, today was the day: my new ASP.NET book arrived.
Read on ...
Read on ...
Posted by: Imar Spaanjaars at Saturday, February 09, 2008 10:22:43 AM in:
Imar's Blogs
I just spent some time answering a question I received from someone called Bill who found an old thread on the
p2p.wrox.com forum. 10 seconds after I sent my reply, I received the following automatic reply.
Read on ...
Posted by: Imar Spaanjaars at Sunday, February 03, 2008 1:23:10 PM in:
JavaScript
A while ago I needed the ability to display a "no image available" image in a list of products when an image for that product was not available on the server.
Read on ...
Posted by: Imar Spaanjaars at Sunday, February 03, 2008 12:10:04 PM in:
Imar's Blogs
Ever since I posted my article series about
N-Layer design, people asked me if I use any code generators to create the basic framework for the classes used in my model. The usual answer was: yes, I do, but I use a home grown code generator for it, making it impossible to share it with others. Fortunately, that has changed....
Read on ...
Posted by: Imar Spaanjaars at Thursday, January 31, 2008 7:20:28 AM in:
Imar's Blogs
A few days ago I sent in the last corrections for my new book Beginning ASP.NET 3.5 with C# and VB.
Read on ...
Posted by: Imar Spaanjaars at Friday, January 18, 2008 9:51:40 PM in:
Imar's Blogs
Do you want to be my colleague and get involved in the projects I am working for? Now is your chance, because we're hiring...
Read on ...
Posted by: Imar Spaanjaars at Friday, August 31, 2007 10:17:25 PM in:
.NET 3.5 General
How often have you written code that redirects to another page and passes some local variables? You probably use string.Format to make your code easier to read. E.g.:
int categoryId;
// Code to assign a value to categoryId here
Response.Redirect(string.Format("SomePage.aspx?CatId={0}", categoryId.ToString()));
Have you ever wished there was an overload of the Redirect method that allowed you to omit the call to string.Format and simply let you write something like this:
int categoryId;
// Code to assign a value to categoryId here
Response.Redirect("SomePage.aspx?CatId={0}", categoryId.ToString());
This code makes it much easier to redirect to a page with a number of variables in the Query String. All you need to do is provide a composite format string as the new URL and a bunch of values that are used instead of the placeholders.
With Extension Methods - that come with .NET 3.5 - you can easily accomplish this yourself.
Read on ...
Posted by: Imar Spaanjaars at Friday, August 24, 2007 9:21:12 PM in:
Imar's Blogs
Now that Amazon has
spilled the beans, I might as well tell you what the new project is that I am working on, and why it has been so quiet for some time on my own web site.
Read on ...