Thursday, June 26, 2008

RoundedCornersExtender may cause missing borders

RoundedCornersExtender may cause missing borders

If you've been encountering missing borders when using the RoundedCornersExtender, it may be because the panel you're applying the RoundedCornersExtender to may be enclosed within a container that is unable to provide the space for the border to appear. Simply add padding via the CSS attribute to the container for the border to appear.

Example (before):

<table>
  <tr>
    <td>
      <asp:Panel ID="myPanel1" runat="server">
        &nbsp;
      </asp:Panel>
      <ajaxToolkit:RoundedCornersExtender ID="rceMyPanel1" runat="server" TargetControlID="myPanel1">
      </ajaxToolkit:RoundedCornersExtender>
    </td>
  </tr>
</table>


Example (after):

<table>
  <tr>
    <td style="padding: 4px;">
      <asp:Panel ID="myPanel1" runat="server">
        &nbsp;
      </asp:Panel>
      <ajaxToolkit:RoundedCornersExtender ID="rceMyPanel1" runat="server" TargetControlID="myPanel1">
      </ajaxToolkit:RoundedCornersExtender>
    </td>
  </tr>
</table>

1 comment:

Pravesh Singh said...

Very informative post. Its really helpful for me and beginner too. Check out this link too its also having a nice post with wonderful explanation on
Ajax Toolkit RoundedCornersExtender Control in ASP.Net...
Ajax Toolkit RoundedCornersExtender Control in ASP.Net

Thanks