nav-left cat-right
cat-right

Manually validate an ASP.Net MVC form on the clien...

A recent problem cropped up in my Asp.Net MVC application. Its using the standard setup of DataAnnotations + MicrosoftMvcValidation.js + jQuery 1.4.2, and I needed to check the validation state of a form before performing some client-side actions. No problem, right? Obviously not. This second part of this post gets in depth as to what's going on with the MicrosoftMvcValidation script, but to save you some time,...

ASP.Net MVC – How to route to images or othe...

A recent question on Stack Overflow (and subsequent answer that I wrote for it) inspired this post. I had recently been discussing URL rewriting in depth with my brother, and have also been doing some introductory work with the routing engine in ASP.Net MVC, and the question piqued my interest since I had been meaning to look at this more closely for some time. The question on Stack Overflow is titled "How do I route...

.Net Mocking Frameworks – Capability Compari...

I have a couple years of experience of TDD under my belt, but it's only recently that I've felt like I am a relatively decent practitioner of it.  I attribute this to forcing myself to take the plunge into mocking, and the knowledge of patterns and loosely-coupled design that I've gained from it. You see, I work on a pretty large and complex ASP.Net webforms product, and tests were introduced late into the...

ASP.Net Load Testing and Optimization Toolkit R...

One of my passions is optimization. There's no code related task I like more than making something run better, faster, snappier -- from tweaking UI registry keys to stripping out crap code -- I want results.  Usually if something is noticeably slow on the user's end, there's something fundamentally wrong that can be made faster -- a lot faster. Why do I love optimization? It's because it's the...

ASP.Net Web Forms dying a slow death?

Being a web programmer for the last 10 years, I've seen a few different paradigms come and go in the web world. Looking around today, I can't help but think that the writings are on the wall for the ASP.Net "webforms" web application model. When it debuted, it was revolutionary to have a fully typed, compiled OO framework that was virtually portable to mobile and desktop. However, since then, ASP.Net...

HTML manipulation with System.Xml.XmlDocument

HTML Table of Contents Generator Example Sometimes it's easy to forget that HTML is just one type of XML, and hence you can utilize the System.Xml library for fun and profit with your HTML. System.Xml is full of powerful tools to manipulate well-formed documents, and you really don't need to know much about XML to leverage it. With two simple lines of code you can have a document loaded into a data structure that has...