Quick Tip: Avoid Enums If Possible
One of the “anti-patterns” I come across from time to time is over-use of enumerations for control flow. This article describes why I consider it an anti-pattern, and how to counteract it.
One of the “anti-patterns” I come across from time to time is over-use of enumerations for control flow. This article describes why I consider it an anti-pattern, and how to counteract it.
In this article I describe how to create shaped buttons in HTML/CSS that size to their content, have roll-over state, and require only a single image, using jQuery.
I wrote an article about this problem a while back – but it seems that the fix is relevant to more than just 64-bit installs of Vista, so I thought I’d re-release it in the hope that it reaches and helps a few more people.
Usually, you don’t want the browser doing any kind of caching on dynamic content served from a generic handler (.ASHX) in ASP.NET – afterall, the content is usually changing (dynamic). Sometimes however, it’s handy to use a handler to serve content that effectively never changes. Here’s how.
Recently I needed to display rotated graphics within a web-page. Since there’s no way to do that cross-browser using CSS, I needed to auto-generate a collection of pre-rotated images that could be displayed as CSS sprites. I’ve found that WPF (Windows Presentation Foundation) is great for generating batches of images suitable for use in web [...]
Internet Explorer 8 (IE8) has now been released to the public, and while it’s not enough to shift me from Firefox, I’m happy that it offers standards-compliant rendering and a useful “compatibility view”, meaning that web developers can essentially test on IE7 and IE8 without needing virtual machines. Unfortunately, when installed on 64-bit Vista (x64), [...]
Correctly controlling content expiration is a tricky thing. You need to balance two goals: getting the browser to cache as much as possible to reduce page load times and bandwidth, versus not showing the user stale content. In this article I’ll cover a simple technique (with code) to solve this issue in ASP.NET for stylesheets [...]
Deleting a cookie from ASP.NET is something that trips up a lot of people (myself included when I first started ASP.NET coding). Here’s how:
One of the really nice features of the jQuery JavaScript library is that it allows you to very easily write plug-in methods for it. Custom jQuery plug-ins are called by the end-user in exactly the same way as the core jQuery methods, and make use of the powerful querying syntax. On top of all that, [...]
I’ve only been using jQuery for a couple of months now, but I’ve been immediately impressed by its power and concise syntax. I thought I’d present it from my (a developer’s) perspective. I come from a C# background, so this article will be written from that sort of point of view.
I’ll start with an example. [...]