You may try this
<asp:Button ID="btnview" CssClass="button" runat="server" Text="View" OnClick="btnview_Click" onClientClick="yourjavascriptfunction();"/>
and from code behind
ClientScript.RegisterStartupScript(typeof(Page), "SymbolError",
"<script type='text/javascript'>yourjavascriptfunction();</script>");
Thanks