How use or get repeater control item command how to change of one repeater command click second repeater in asp.net


backend code
poage.aspx.vb code here

Protected Sub Repeater1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles Repeater1.ItemCommand

        If String.Equals(e.CommandName, "Details") Then

             Dim tid As String= e.CommandArgument'
            ' '''''''''''''msgbox(tid)
            Dim dtdet As New DataTable
            Query = "select * from registration where mid='" & tid  &"'"

            dtdet = Conn.ReturnDataTable(Query)


            Repeater3.DataSource = dtdet
            Repeater3.DataBind()

            Catch ex As Exception

                Response.Write("UnSuccessfull" & ex.Message)
            End Try
        End If


  If String.Equals(e.CommandName, "Details1") Then
   ''' statement here of thes command
     End if

    End Sub



''' page.aspx code

 <asp:Repeater id="Repeater1" runat="server"  onitemcommand="Repeater1_ItemCommand">
   
    <ItemTemplate >
 
                 
       <div>
       <br />
       <br />
       <div class="example-four" style="width: 800px; height: 80px; background-color: #FFCC00; font-weight: bold; color: #000000;">
       <table CLASS="table table-condensed table-responsive " style="color: #000000">
 
   
     <tr>
     <td>User Id</td>
 
   
 
     <td>Name</td>
 
   
    <td>Mobile</td>
     <td>Amount </td>
     <td>Details</td>
     <td>   Time left:  &nbsp; &nbsp;</td>
     </tr>
     <tr>
      <td><%# DataBinder.Eval(Container.DataItem, "Mid") %></td>
      <td><%# DataBinder.Eval(Container.DataItem, "BankHdName")%></td>
       <td >
                                                        <%# Eval("Mobile")%>
                                                    </td>
     <td><%# DataBinder.Eval(Container.DataItem, "Tamount")%>  Rs.
   
                                                        <br />
                                                        <%# Val(DataBinder.Eval(Container.DataItem, "Tamount")) * 0.000016%>  BTC
     </td>
   
 
   
     <td>  <fieldset>
                                                <div class="custom-file-upload">
                                              <asp:LinkButton ID="LinkButton2" runat="server"
                                                           class="BTN danger  "  CommandArgument='<%#Eval("TID")%>'
                                                            CommandName="Details" ForeColor="Black" OnClientClick="this.disabled=true;"
                                                            Text='Click Here To View Details'
                                                            Visible='true' BackColor="#FF9933" />

   <asp:LinkButton ID="LinkButton2" runat="server"
                                                           class="BTN danger  "  CommandArgument='<%#Eval("TID")%>'
                                                            CommandName="Details1" ForeColor="Black" OnClientClick="this.disabled=true;"
                                                            Text='Click Here To View Details'
                                                            Visible='true' BackColor="#FF9933" />
                                                </div>
                                                </fieldset> </td>
   
   

                                                </tr>
     

       </table>
       </div>
       </div>
               
           
    </ItemTemplate>
</asp:Repeater>


''In commang argument set your custom parameter there which  you want & command name also you ''can change and link buttons also multiple you can  add command and read it

Comments

Popular posts from this blog

System Center 2012 FREE Product Key

Microsoft Visual Studio 2015 Pro & Enterprise,PROFESSIONAL PRODUCT Keys FREE

Ways to Make Money Online Free with mysurvey my survey