Icon button refers to the button which has one or two icons on it. With the icon showing on the button, the function of the button can be understood in an easier and more intuitive way. Actually, the icon can be counted as the extended version of standard button.
This online tutorial is going to guide users to customize the icon settings in asp.net application using C# programming code from following three aspects, which are IconCssClass, Icon Position and Icon Size.
Before offering detailed C# codes, we will offer some important introductions for icon buttons here. And since we can add one or two icons to the button, the icon can be mainly divided into two categories, which are PrimaryIcon and SecondaryIcon. Users are free to choose to set one or both of these two icons. Note: both PrimaryIcon and SecondaryIcon have their default properties. Set IconCssClass Using C# Code
The properties of icon button can be easily configured using the CSS. And to make the control easier to use, we even offer a pre-defined set of built-in PerButton Icons. That is to say, you can easily configure the icon properties by just setting PrimaryIconCssClass or SecondaryIconCssClass property to the predefined CSS class. PerButton1.Icon.PrimaryIconCssClass = "rbNext"; Define Icon Position Using C# Code
You can accurately define the position of icon in the button by setting the distance between icon and four sides of the button respectively. PerButton1.Icon.PrimaryIconTop = 30; Customize Icon Size Using C# Code
You can use this property to customize the width & height of icon. Following C# code is offered to help users adjust the size of button, the size of Primary Icon as well as the size of Secondary Icon. PerButton1.Width = 200; | ![]() ASP.NET AJAX UI Controls ASP.NET AJAX Chart UI Control ASP.NET AJAX Grid UI Control ASP.NET AJAX Barcode UI Control ASP.NET AJAX Button UI Control OverviewGetting StartedButton Type Standard ButtonIcon ButtonImage ButtonLink ButtonToggle ButtonSplit ButtonClient Prpgramming Button EventServer Programming Button EventASP.NET AJAX Calendar UI Control ASP.NET AJAX NavigationBar UI Control ASP.NET AJAX Captcha UI Control ASP.NET AJAX Color Editor UI Control ASP.NET AJAX ComboBox UI Control ASP.NET AJAX DataPager UI Control ASP.NET AJAX Dock UI Control ASP.NET AJAX DropDownList UI Control ASP.NET AJAX DropDownTree UI Control ASP.NET AJAX HtmlEditor UI Control ASP.NET AJAX FileManager UI Control ASP.NET AJAX Filter UI Control ASP.NET AJAX Input UI Control ASP.NET AJAX ListBox UI Control ASP.NET AJAX ListView UI Control ASP.NET AJAX ToolBar UI Control ASP.NET AJAX TabControl UI Control ASP.NET AJAX Menu UI Control ASP.NET AJAX ToolTip UI Control |