Category Archives: Www

Minimalist’s build script for ASP.NET projects

When deploying ASP.NET web sites you have a number of options ranging from full blown (up) MSI installers, MSDeploy or the KISS option: xcopy deployment. If the target IIS set up this is a very clean way to redistribute your application. First download a 7za.exe archiver and put it in your solution root. Then create a [...]

JavaScript commas in IE

While working with JQuery UI DataTables I got some strange JS errors in IE. And not from any-better-browser. ‘style’ is null or not an object My Google cortex provided the answer: IE javascript engine treats array/object initialization different from other engines. While other browsers simply ignores if the initialization has a trailing comma, IE don’t. [...]

Getting the name attribute of an MVC Html-helper output

It seems odd there is no standard way of getting the name of a control rendered with the Html helper extensions in MVC3 Razor. I saw some proposed solutions, but none of the actually worked e.g. in partial views or list binding. This solution gets it right, but is nonetheless just another hack. You can [...]

ASP.NET XSLT Control

Here’s a highly scalable ASP.NET control that uses the fast Data Contract Serializer to generate XML for an object and transforms it using a cached instance of XslCompiledTransforms. I find it a very versatile little tool for generating content that doesn’t post back. using System; using System.IO; using System.Runtime.Serialization; using System.Text; using System.Web; using System.Web.Caching; [...]

301 Moved Permanently

It’s generally good practice to set up a DNS A-record to point to ‘yoursite.com’ and a CNAME that aliases ‘www.yoursite.com’ with ‘yoursite.com’. Many users still think all addresses begins with www, and smarter/more lazy surfers simply skips the leading www and types in the top level domain name. If you don’t do anymore about it, [...]

Follow

Get every new post delivered to your Inbox.