开心

Reapeater CommandName ,CommandArgument

 <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" onmouseup="hide('open')"  href="#" onclick="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();

}

posted @ 2016-03-29 11:35  大喜  阅读(295)  评论(0编辑  收藏  举报
坦然 会增进信任 - 信任 感情才会升华