you can use button1.OnClientClick = "javascriptfunction();"; and if you want to just call a script function and you dont need to postbach the page, you can use button1.OnClientClick = "javascriptfunction();return false;"; We Can Do Anything, If We Want It