SIGN UP MEMBER LOGIN:    
ARTICLE

RoundedCornersExtender Control in AJAX Using ASP.NET

Posted by Alok Pandey Articles | AJAX in C# February 14, 2012
The RoundedCornersExtender control adds rounded corners to elements. In this article you will learn how to use the RoundedCornersExtender control in AJAX.
Reader Level:

Introduction

The RoundedCornersExtender control adds rounded corners to elements. Its properties are given below.

  • TargetControlID : It set the ID of control which will be attached with RoundedCornersExtender.
  • Radius : It  is used to set the radius of corner. The default is 5.
  • Corners :  It is used to set the corner of the target element. There are different values for this. They are All, Buttom, ButtomLeft, ButtonRight, Left, None, Right, Top, TopLeft and TopRight.
  • Color : It is used to set the color of corners.
     

Now we take a ASP.NET Web Application and then we use a RoundedCornersExtender control to our application. Follow the given steps.

Step 1 : Take a ASP.NET Web Application.
Step 2 : Go to Toolbox and take ScriptManager at first on the form.



Step 3 : Take a Panel and take three Labels, two TextBoxes and one Button control inside the Panel. Change the Text property of a Label and Button like in the following figure.



Step 4 : Go to the ToolBox and take a RoundedCornersExtender control.



Code on .aspx page

<
asp:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server">
        </asp:RoundedCornersExtender>

Step 5 : Set the property of RoundedCornersExtender control.

       <asp:RoundedCornersExtender ID="RoundedCornersExtender1" TargetControlID="Panel1" Color="Black" Corners="Bottom" runat="server">
        </asp:RoundedCornersExtender>


Code on .aspx page

<
head runat="server">
    <title></title>
    <style type="text/css">
    .pannelbg
    {
        background-color:White;
        width:400px;
      
    }
    </style
>

</
head>
<
body style="background-color:Green">
    <form id="form1" runat="server" >
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <asp:Panel ID="Panel1" CssClass="pannelbg" runat="server">
        <asp:Label ID="lbllogin" Text="Login..." Font-Bold="true" Font-Size="20"  ForeColor="Red" runat="server"></asp:Label><br /><br />
        <table style="height:200; width:300">
        <tr>
        <td><asp:Label ID="lblusername" Text="User Name" Font-Bold="true" Font-Size="18" ForeColor="Red" runat="server"></asp:Label></td>
         <td><asp:TextBox ID="txtusername" Height="30" Width="150" Font-Size="20" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
        <td><asp:Label ID="lblpwd" Text="Password" Font-Bold="true" Font-Size="18" ForeColor="Red" runat="server"></asp:Label></td>
         <td><asp:TextBox ID="txtpwd" Height="30" Width="150" Font-Size="20" TextMode="Password" runat="server"></asp:TextBox></td>
         <td></td>
        </tr>
        <tr>
        <td><asp:Button ID="btnlogin" Text="Login" Font-Bold="true" Height="41px"
                Font-Size="20" ForeColor="Black" runat="server" /> </td>
         <td></td>
        </tr>
        </table>
        </asp:Panel>      
        <asp:RoundedCornersExtender ID="RoundedCornersExtender1" TargetControlID="Panel1" Color="Black" Corners="Bottom" runat="server">
        </asp:RoundedCornersExtender>
    </div>   
    </form
>

</
body>
 
Run the application.


Now set the Radius and Corners properties.

<
asp:RoundedCornersExtender ID="RoundedCornersExtender1" TargetControlID="Panel1" Radius="10" Color="Black" Corners="BottomRight" runat="server">
        </asp:RoundedCornersExtender>

Run the application.



Set its Corners property to "None".

 

Resources

AJAX Rating Control

DropShadowExtender Control in AJAX Using ASP.NET

RangeValidator Control With AJAX Using ASP.NET

ConfirmButtonExtender Control With AJAX Using ASP.NET

Login to add your contents and source code to this article
share this article :
post comment
 
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Become a Sponsor