Archive for the 'C#' Category
Since I’m having trouble producing full-length articles at the moment, I thought I’d try a different track to at least get some value out of my blog hosting costs. I’ll try to post a handful of links that have caught my attention each week.
February 7th, 2010 | Posted in C#, JavaScript, Links, Opinion | No Comments
Of the three textual formats that make up the main pillars of web development (HTML, CSS, and JavaScript), CSS has had the least attention in terms of server-side processing. HTML is obviously well covered, with frameworks such as ASP.NET. JavaScript is starting to be covered with compilers such as Google’s Closure Tools. Until now however [...]
January 17th, 2010 | Posted in ASP.NET, C#, Links | No Comments
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.
May 1st, 2009 | Posted in ASP.NET, C#, Coding, Tips, Tutorials | 4 Comments
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 [...]
April 10th, 2009 | Posted in C#, Coding, Experiments, Tips, Tutorials | 2 Comments
Closures are a really useful programming construct, but as they’re only just appearing in the C-family languages, they’re relatively new to me. In this article I show how they can be used to vastly simplify event-handler code in web development.
February 20th, 2009 | Posted in ASP.NET, C#, Coding, Tips | No Comments
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 [...]
January 29th, 2009 | Posted in ASP.NET, C#, Coding, Tips, Tutorials | No Comments
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:
January 25th, 2009 | Posted in ASP.NET, C#, Coding, Tips, Tutorials | 2 Comments
There’s been a bit of discussion about my last article, “LINQ-to-Entities: The Blackberry Storm of ORMs?“. I thought I’d try to clear up a bit of what I was trying to say, especially with regards my statement about LINQ-to-Entities returning differing values depending on code order.
December 4th, 2008 | Posted in C#, Coding, Experiments, Opinion | 7 Comments
(In case you missed the reference, the new Blackberry Storm has been widely slammed as an inferior copy of the iPhone, and was released basically unfinished to try to fend off its better rival).
Note: the first part of this article is a bit of an opinionated rant – if you want to skip to the [...]
December 3rd, 2008 | Posted in C#, Coding, Experiments, Opinion | 16 Comments
Look at the following C# code, and work out why it compiles:
namespace X
{
class Foo
{
void Bar()
{
http://www.hackification.com
System.Console.WriteLine();
}
}
}
(Hint: it’s not an error, but it is a warning.)
Idea originally from here.
Oh – and please, please, [...]
September 8th, 2008 | Posted in C# | 3 Comments