I tried your example with my testing application and it's working properly as you can also try the code given by me:
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
<script type="text/javascript">
function GetMSG() {
alert("hello");
}
</script>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder2">
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</asp:Content>
And write a code for invoke function on button click even on code behind page:
protected void Button1_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "GetMSG", "GetMSG();", true);
}
please try this example. I hope its helping to you.....Thank You......:-)