4

基本上我想做的是有一个按钮,该按钮只为在单独的表中标记为发送的条目创建。因此,例如,如果我编辑一条记录,我标记另一个表,并希望通过下面的中继器在该记录旁边显示一个发送按钮 - 这可能吗?我可以通过调用例如不确定的方法来进行检查吗:(

<asp:Repeater ID="DepartmentsList" runat="server">
            <HeaderTemplate>
               <table id="grouptable" class="table table-bordered table-striped"> 
                <thead>
                        <tr>
                        <th>Send</th>
                        <th>ID</th>
                        <th>Name</th>
                        <th>Last Modified</th>
                        <th>Actions</th>
                    </tr>
                    </thead>
                    <tbody>
            </HeaderTemplate>
            <ItemTemplate>
                        <tr>
                        <td>
                        <input type="checkbox" name="sendSelect[]" value="<%# Eval("Dept_ID") %>"</input></td>
                        <td><%# Eval("Dept_ID") %></td>
                        <td><a href="<%# Eval("gURL") %>"><%# Eval("DESC") %></a> </td>
                        <td><%# Eval("CHG_DATE") %></td>
                        <td><a class="btn btn-info" href="<%# Eval("gURL") %>"><i class="icon-pencil icon-white"></i> Edit</a><asp:Button ID="Button1" runat="server" Text="Send" /></td>
                        </tr>
            </ItemTemplate>
            <FooterTemplate>
                        </tbody>
                </table>
            </FooterTemplate>
            </asp:Repeater>
4

1 回答 1

2

您可以使用DepartmentsList_OnItemDataBound事件检查并检查绑定到转发器的当前数据记录。它为您提供了动态更改转发器项目中绑定和创建的内容所需的所有功能。

于 2012-08-09T08:57:45.120 回答