August 2006

12 articles published in August 2006

  1. Add validation to business objects

    · 3 min read

    Recently, I had to implement validation on business objects in an already existing project. The validation should ensure that the different classes in the business object tier would validate them selves based on business...

  2. Overload operators the right way in C#

    · 3 min read

    It’s a good rule of thumb to overload the equality operators on classes. That ensures a correct comparison between to class instances of the same type. If you don’t, .NET automatically uses reflection and that is way...

  3. Cross browser client caching

    · 1 min read

    Internet Explorer and the Gecko based browsers (Firefox, Netscape and Mozilla) have different ways of managing their internal cache. The speed of the browser cache is much faster that a server caching, so be sure to do...

  4. HTTP compression in ASP.NET 2.0

    · 2 min read

    The new System.IO.Compression namespace in .NET 2.0 makes it easy to implement HTTP compression without having to touch IIS. The best thing about it is that you no longer need any third party compression components, it’s...

  5. Create safe events in C#

    · 1 min read

    Whenever you write class libraries, custom control or just about anything else, you probably raise a lot of home made events. That’s a simple thing to do, but tedious to write over and over again. That’s why I always use...

  6. Reduce the weight of stylesheets by 35% at runtime

    · 3 min read

    It is always desirable to produce the smallest amount of client-code at any given time. That includes HTML, JavaScript and CSS files. The more client-code you produce, the longer it takes to download and render the web...

  7. Securing ViewState efficiently and simple

    · 3 min read

    Even though ViewState is unreadable by the human eye, it is nothing but a base64 encoded string that easily decodes by a piece of software like this one . With this knowledge in mind, you might want to look at how you...

  8. The DataRow’s object model has a quirk

    · 2 min read

    I’m sure you’ve used a DataRow a thousand times before without noticing the quirk. I’m not talking about a bug or missing functionality. No, I’m talking about something much less important, but still very puzzling. A...

  9. Add true confirmation to the ASP.NET Button control

    · 4 min read

    The JavaScript confirm() function is simple to implement on a Button control, but you can only use it for one particular purpose and that is to confirm a postback. Let’s look at an example of this simplicity first and...

  10. JavaScript: Alert.Show(”message”) from ASP.NET code-behind

    · 2 min read

    In highly interactive websites and intranet sites, you probably want to let the users know what’s going on when they delete, save, export etc. on the site. Those kinds of status messages are widely used and are often...

  11. Fix the ”Click to activate” Flash content in IE

    · 2 min read

    In the good name of internet security, Microsoft added a feature in Internet Explorer that disables automatic activation of objects. All objects in an HTML <object> tag is affected and that includes Java applets and...

  12. ASP.NET client-callback – simplicity vs. performance

    · 4 min read

    In light of the rising popularity of AJAX during the last couple of years, Microsoft wanted to include the feature natively into ASP.NET’s object model. They came up with an elegant solution for the feature in ASP.NET...