$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
How to Build Standard Button Using C#
Home > How to > Standard Button

Build Standard Button

The PerButton component supports various button types and one of the most basic types is standard button (the other two button types are link button and toggle button). Thus, this button type is used as the default button of this PerButton control. By adding one or two icons to the standard button, the button will be changed to icon button. If you add an image to the standard button, the button can be used as image button.
In following text, we will offer detailed C#.NET programming codes for users to create and customize standard button in ASP.NET web application. Before running the sample C# codes listed below, in order to achieve the AJAX effect, please drag an AjaxPanel component from toolbox to aspx web page and then drag a button control from toolbox to that AjaxPanel. After you finish these preparing works, you can modify the button properties in the aspx.cs file.
And the configuration of the aspx.cs file to create a standard button using C# code can be achieved from following several aspects.

Set Button Type in C# Code

The standard button is the default button type of the PerButton component. That is to say, if you do not set the target button type or the icon property or the image property, this button will be created in the form of standard button.

Set Button Border in C# Code

This property allows users to customize the settings of button border color, border style and border width.
PerButton1.BorderStyle = BorderStyle.Solid;
PerButton1.BorderColor = System.Drawing.Color.Orange;
PerButton1.BorderWidth = 3;

Make Button Clickable or Not in C# Code

When setting this property to true, you make the button clickable. If you set it to fals, the button will be grayed out and can not be clicked.
PerButton1.Enabled = true;

Define Button Text Font in C# Code

By using the font property, you can customize the font size and text style (like bold or italic).
PerButton1.Font.Bold = true;
PerButton1.Font.Size = 16;

Set Button Color in C# Code

The button color property is responsible for both the button background color and the text font color.
PerButton1.BackColor = System.Drawing.Color.White;
PerButton1.ForeColor = System.Drawing.Color.Orange;

Customize Button Size in C# Code

Apart from the button color, the size of standard button can be also fully customized. If you want to tailor the height and width of standard button to your desired values, you can use the button sizing properties.
PerButton1.Width = 200;
PerButton1.Height = 30;
ASP.NET AJAX UI Controls