remove your javascript code and add the onclick attribute to your button as below
<asp:button id="Button2" runat="server" text="Ok"
Width="123px" OnClick="ImageButton10_Click" ></asp:button>
you dont want to call script to calling the Server side code.