Put a placeholder around your script
<asp:Placeholder ID="PlaceScript" runat="server">
<script type="text/javascript">
function Show() {
document.getElementById('<%= bttn.ClientID %>').click();
}
window.onload = Show;
</script>
</asp:Placeholder>
then hide the placeholder when the button is clicked
protected void bttn_Click(object sender, EventArgs e)
{
success.Visible = true;
PlaceScript.Visible = false;
}