How to set Control Border through code-behind?

 Posted by vishalneeraj-24503 on 6/5/2014 | Category: ASP.NET Interview questions | Views: 1191 | Points: 40

With the help of control BorderWidth property,we can set control border width.We have to use Pixel static method of Unit class and we have to pass a numeric value in it.

For Example:-
Suppose,i have a button control like below whose border i have to set
<asp:Button ID="Button4" runat="server" Text="Button"/>

In the code behind,
We will write:
Button4.BorderWidth = Unit.Pixel(1);

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response