日期:2014-05-17  浏览次数:20579 次

在DataList中添加按钮,但是在后台调用不到前台按钮的ID,求大神请教!~
0....0 坐 等大神

------解决方案--------------------
前台
HTML code

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Styles/adminCss.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DataList ID="ddlImport" runat="server">
            <ItemTemplate>
                <table class="gridview">
                    <tr>
                        <td>
                            <asp:Label ID="lbladcode" runat="server" Text='<%#Eval("AD_CODE") %>' Width="100px"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lbldesc" runat="server" Text='<%#Eval("DESC3")%>' Width="100px"></asp:Label>
                        </td>
                        <td>
                            <asp:Button ID="btnTest" runat="server" Text="TEST" />
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
    </div>
    </form>
</body>
</html>