Kemp hit it on the head, but what you need to keep in mind when doing this is that you're not guaranteed it will work. Only a hand full of people browse with Javascript off but if there's incentive to turning it off, more people will.
By the by, ASP can't do this by itself either, I'm assuming there you're using it with VBScript, which only works in IE... depending on your targetted audience this could have unexpected results as well.
-Rob