Apr 13, 2012

How to Make a Button Round in ASP.NET

,


The border-radius class in CSS provides you with the ability to round a button on your ASP.NET Web apps. Use this class to round buttons when users view your website controls from older browsers, which display rectangular buttons. It also makes it more convenient to create rounded corners without the need to generate an image. Apply the border-radius class to your ASP.NET buttons in the Visual Studio .NET framework software.

Instructions

    • 1
      Open your ASP.NET Web project in the Visual Studio designer software. Double-click the form that contains your button.
    • 2
      Create the CSS class style in the "head" section of your code. Add the following code to your form file:
      #button1{
      border-radius: 30px;
      }
      Higher radius values create more rounded buttons. If you change the pixel value to a smaller value such as "10px," the button is not round, but the corners are rounded.
    • 3
      Link the new button class to the target button. The following code is an example of an ASP button using the button1 class to round its layout:
      <asp:Button id="button1" class="button1" />
 

HowToYo Copyright © 2011 | Template design by O Pregador | Powered by Blogger Templates