Whilst searching for the solution of referencing a control defined in a content page from JavaScript, I found this great article ASP.Net 2.0 – Master Pages: Tips, Tricks, and Traps by K. Scott Allen. It’s definitely one of the most comprehensive, in-depth articles I’ve come across (despite having bought two fairly advanced books on ASP.NET 2.0!). Scott Guthrie linked to this article a while ago here. The article describes how master pages and content pages are combined, event ordering, interacting between the master page and content pages and vice versa, JavaScript and naming containers, and name mangling (the bit that solved my particular problem).