It's been questoned and blogged about on the web quite a bit, but for those looking here for the first time...
If you want to prevent the ASP.NET button from causing a postback, then have the Javascript function return false and set your on OnClientClick attribute as follows:
<asp:button ... onclientclick=" return Foo()" />
Javascript function:
function Foo()
{
alert('Hello world');
// It's the return false that prevents the postback, if you return true the postback will occur
return false;
}