Ajaxcontroltoolkit roundcornersextender无法正常工作

时间:2010-01-15 12:35:20

标签: asp.net ajaxcontroltoolkit

以下是示例代码..我找不到表格的任何圆角。 .. 我无法修复错误... plz,帮助               

            <cc1:roundedcornersextender id="rce" runat="server" targetcontrolid="tbl"
        radius="10" corners="All" />
    <table id="tbl" runat="server" style="border: medium solid #0000FF; width: 41%;">
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>

2 个答案:

答案 0 :(得分:1)

请尝试使用此示例代码,它在IE7&amp; IE8

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .myborder
        {
            background-color:Green;
         }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:Panel runat="server" ID="RoundedPanel" CssClass="myborder" Width="200px" Height="80px">
            <table id="tbl" >
                <tr>
                    <td>
                       Testing
                    </td>
                     <td>
                       Testing
                    </td>
                    <td>
                       Testing
                    </td>
                </tr>
                <tr>
                    <td>
                       Testing
                    </td>
                    <td>
                       Testing
                    </td>
                    <td>
                       Testing
                    </td>
                </tr>
                <tr>
                    <td>
                       Testing
                    </td>
                    <td>
                       Testing
                    </td>
                    <td>
                       Testing
                    </td>
                </tr>
            </table>
        </asp:Panel>
         <cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="RoundedPanel" radius="10" corners="All" >
         </cc1:RoundedCornersExtender>
    </div>
    </form>
</body>
</html>

请提供身高&amp; Panel的宽度值,

输出alt text

的屏幕截图

答案 1 :(得分:0)

将表格包裹在面板中,并使用面板作为目标。

<asp:Panel ID="Panel1" runat="server" BackColor="Blue">
  <table>....</table>
<asp:Panel>
<cc1:roundedcornersextender id="rce" runat="server" targetcontrolid="Panel1" radius="10" corners="All" />