I’ve recently been adding Knockout to an ASP.NET MVC application. I would consider Knockout a previous-generation solution and would prefer to use a full-fledged SPA framework like Aurelia, but that’s a bit out of scope for the moment. After introducing Knockout, I wanted to add unit tests on my viewmodels with Mocha. I had some trouble at first, and read quite some answers on StackOverflow that claimed you need a browser. Because you’d want to run the tests from a

If you switched to **IE10 **and your Knockout bindings that previously worked in IE (8 in my case) now give you the following error: "String expected", you might want to check your bindings. Mine had a computed ‘toString’ member. I’m not sure what’s happening but choosing the name of an existing, default member might not be a good idea. Replacing it with something else (i.e. "description") and updating my markup fixed this issue. Just putting this out here in case

Stuck with ye olde ASP.NET Webforms? It doesn’t mean you have to miss out on all the good javascript fun (which is, in fact, also an old technology). At my current client (being a consultant and all), we have carefully introduced Knockout.js for the more complex screens. To be honest, it’s only used in two screens at the moment, but the team is open to it being used more and more. That being said, we don’t regard it as the

At the day-job, we (finally!) get to use Knockout in our old-school WebForms application, albeit on one page to begin with (which is fine; one step at a time). If you’re not familiar with Knockout, check out their site and great documentation. If you have a Pluralsight account, even better! They have an excellent course that will get you started very quickly. Anyway, I came across a situation where I needed to bind a property of my viewmodel to the