When rendering output from a razor template it is important to remember the distinction between @{ ...} and @(...) Curly braces will cause the output to execute, whilst the regular parenthesis will cause the output to render. As an example that tripped me up during rendering of a ViewComponent in the CamperFinder demo, the following... Continue Reading →
Using media queries in razor page files
When hardcoding a media query into an ASP.NET Razor page file, you need to use @@ instead of @ to ensure the query is rendered correctly. Kudos: https://stackoverflow.com/a/6873785/75594
Adding SQL MIME type to IIS 7
To download a SQL file from an IIS hosted website the website needs to know how to handle the file. In general terms a SQL file is plain text, so the respective MIME type would be text/plain This can be added to IIS manually using the MIME types editor. Or for a more reliable approach... Continue Reading →
Arduino Uno 101: Using the SparkFun Inventor’s Kit (UK)
I’m an experienced programmer, but have only ever touched on electronics during A-levels and my degree course. New developer boards Arduino open up the world of micro-electronics to those with little or no experience. This is the start of my adventure: The kit I brought was the SparkFun Inventor's Kit for Arduino with Retail Case... Continue Reading →
The Art Of Unit Testing, TDD
My quote-of-the-day, regarding Test Driven Development: I am convinced that it [TDD] can work to your benefit, but it’s not without a price (time to learn, time to implement, and more). It’s definitely worth the admission price, though. Taken from the excellent The Art of Unit Testing: with Examples in .NET by Roy Osherove.
Microsoft Mocking
As a .NET developer I don’t like using third party controls when there is tooling available from MS that will do the job I need. For example I prefer using the “baked in” MSTest suit as opposed to NUnit or MBUnit. The same is true for a mocking framework. I have tried with varying levels... Continue Reading →
Memory Management Misconceptions
A couple of highly useful memory management references from RedGate Top 5 .NET Memory Management Misconceptions - Ricky LeekMemory Management Wallchart [ZIP]WPF and Silverlight gotchas [PDF]
Paperless Home
Many, many years ago I had a flatbed scanner and that scanner had a gnatty ‘scan-to-email’ function that would email any scans as a PDF attachment. Many years later (but still many years ago) I signed up for the Google Documents online service and registered for their Email to Documents service. This was a hashed... Continue Reading →
Slash your ASP.NET compile/load time without any hard work
Slash your ASP.NET compile/load time without any hard work
Silverlight Tab Stops – IsTabStop
Just found a tricky little quirk with TabStop that caused a fair bit of confusion. It turns out that the default implementation of ContentControl overrides Control, so implements the IsTabStop property, and defaults that value to true. ContentControl is implemented by the delightful BusyIndicator, so if you have used a BusyIndicator within the scope of... Continue Reading →