博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Reapeater CommandName ,CommandArgument
阅读量:5089 次
发布时间:2019-06-13

本文共 913 字,大约阅读时间需要 3 分钟。

 <asp:Repeater ID="RepeaterShow" runat="server" OnItemCommand="RepeaterShow_ItemCommand">

                                                <%--OnItemCommand="Repeater1_ItemCommand"--%>
                                                <ItemTemplate>
                                                    <tr role="row" class="gradeX even">
                                                        
                                                      <%-- <td>
                                                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("id") %>'></asp:Label></td>--%>
                                                    <td>
                                                        <asp:Label ID="Label1" Text='<%# Eval("title") %>' runat="server"></asp:Label></td>
                                                        <td>
                                                           <%-- <a class="make" οnmοuseup="hide('open')"  href="#" οnclick="SelectedImg(<%#Eval("id")%>)">
                                                                选中</a>--%>
                                                            <asp:LinkButton ID="LinkButton1" CommandName="make" CommandArgument='<%#Eval("id") %>' runat="server">选中</asp:LinkButton><%--OnClientClick="SelectedImg(<%#Eval("id")%>)"--%>
                                                           
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                            </asp:Repeater>

 

 

后台;

 protected void RepeaterShow_ItemCommand(object source, RepeaterCommandEventArgs e)

    {
        if (e.CommandName == "make")
        {

string str=e.CommandArgument.ToString();

}

转载于:https://www.cnblogs.com/zhubenxi/p/5332325.html

你可能感兴趣的文章