-- There Is Spelling Mistake In Your Code :
protected void Page_Load(object sender, EventArgs e)
{
//Here You Written "onclck", Actually It Is "onclick"... So Correct it....
Button1.Attributes["onclick"] = "javascript:return(createCustomAlert);";
}
-- Now This Will Work perfectly & Other Ways Which Are Already Displayed By Other That Also Works...