A JavaScript Event Bus

I was working on a Proof of Concept recently that needed to support loosely coupled Ajax components. The idea is a common one – components need to be able to hook into an existing page without detailed knowledge of how the page works, and immediately start responding appropriately. This is basically using loosely coupled events…

4

The Microsoft Ajax Content Delivery Network (CDN)

I keep looking for the URL’s to get Microsoft Ajax, jQuery, the MVC Ajax libraries and more from our new shiny CDN (check here if you’ve not heard of it)… and I can never remember where they are. So this post is for my benefit, not yours J The links to all scripts are at…

0

Loading Scripts Late

On the ASP.NET ScriptManager control there is a useful little property that very few people have heard of called “LoadScriptsBeforeUI”. What does it do? Well, simply put… ·         When “true” (the default) it will render <script> tags for each script you reference using the ScriptManager at the top of your HTML. ·         When “false” it…

0

Executing JavaScript after a Partial Render

I had a fun day debugging some ASP.NET plus jQuery this week, and came across something I’ve known is possible for some time, but that I’ve never actually needed to do… and that was to ensure a bit of JavaScript ran once an UpdatePanel had refreshed as part of a partial render. It turns out…

4

Do you need web client development help?

Then tell us what you need! Blaine has blogged a link to a survey that patterns & practices will use to help them understand what challenges that are affecting you the most… so that they can choose the right areas to focus effort in providing guidance. If you’ve got a couple of minutes spare head…

5

Monitor your ASP.NET Cache API Behaviour

Recently I was working on diagnosing a performance issue with a customer’s web site with a colleague (this is one of our favourite engagement types so if you need some help let me know J), and we found that items were being trimmed very regularly from the ASP.NET Cache, causing excessive back-end work, and in…

9

Detecting Server.Transfer

How do you know when a page is being rendered as the result of a Server.Transfer, rather than a Response.Redirect or the user browsing directly to a page? Actually it’s quite easy, assuming you’re using the default ASP.NET pipeline. In reality the “thing” that is responsible for handling an HTTP request is aptly called an…

5

Enforcing Unobtrusive JavaScript

Unobtrusive JavaScript is a concept that’s been around for quite a while, but it’s now finally starting to make its way into the mainstream. The basic idea is that you should separate your JavaScript from your HTML – so instead of; <a href=”Default.aspx” onclick=”alert(‘Sorry, that is unavailable’); return false;” >Click Here</a> You should have something…

0

String.Unformat: I’ve created a monster

I don’t know if you’re the same, but when coding away I often find myself wishing for a String.Unformat function – call it the evil twin of String.Format. With String.Format I can build up strings like this; var result = String.Format(      “http://{0}:{1}/{2}”,      “localhost”,      “12345”,      “TestPage.aspx”); … which will return “http://localhost:12345/TestPage.aspx“. But…

5

Running two Visual Studio 2008 configurations side-by-side

Recently I’ve come across a requirement to easily switch between two Visual Studio 2008 configurations. I might need these two configurations open at the same time (so can’t just manually edit settings in Tools->Options), and don’t want any lengthy scripts, log on/log off activities, or virtualisation involved… mainly because each of those adds effort and…

1