Home

SpeakComputers.com | Text-to-Speech Software

Natural sounding TTS voice support | Cepstral TTS voices | Text to MP3 | Natural Readers

Text to Speech Software Text to Speech Voices SpeakComputer Text to Speech Software

ASP.NET Button control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

The ASP.NET Button control is used to create a push button on your webpage. The button control is rendered as the HTML input element - type submit control.

Working example.
Click on the button example below to change the background color of the ASP.NET button control.



Example, creating the button control.

<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Click here." BackColor="Control" />

Example code responding to the button controls click event.
The example code below is from the working example above.

<script runat="server">

protected void Button1_Click(object sender, EventArgs e)

{

if (this.Button1.BackColor == System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.Control))

{

this.Button1.BackColor = System.Drawing.Color.Red;

this.Button1.ForeColor = System.Drawing.Color.White;

return;

}

if (this.Button1.BackColor == System.Drawing.Color.Red)

{

this.Button1.BackColor = System.Drawing.Color.Purple;

return;

}

if (this.Button1.BackColor == System.Drawing.Color.Purple)

{

this.Button1.ForeColor = System.Drawing.Color.Black;

this.Button1.BackColor = System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.Control);

return;

}

}

</script>

Top of page
Text to Speech Speech synthesis Software TTS Software
Copy Right 2006 SpeakComputers.com - All Rights Reserved.
About Privacy Policy TTS Resouces
Free Text to Speech software
Free Text to Speech Software