protected override void Render(HtmlTextWriter output) { // Get normal html ouput StringBuilder stringBuilder = new StringBuilder(); StringWriter stringWriter = new StringWriter(stringBuilder); HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter); base.Render(htmlWriter); string html = stringBuilder.ToString(); // Enhance submit buttons string onclick1 = "\"if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate();"; string onclick2 = "\"this.style.display='none';"; html = html.Replace("onclick=" + onclick1, "onclick=" + onclick2 + onclick1.Substring(1)); // Render updated html output.Write(html); }
You need to create an account or log in to post comments to this site.