Tamer_Ahmed
Centurion
hi all,
i get a list of products and bind it to a datalist
and there's a Compare button on the header template
and there's a checkbox in every row
when the user press compare
i want to get the product id which is selected by user
i don't have problem in wirting the code in the itemCommand the problem here
i don't know how to get the product id
this is my code
If e.CommandName = "Compare" Then
Dim str As String
For Each anitem In DataList2.Items
isChecked = CType(anitem.FindControl("chk"), CheckBox).Checked
If isChecked = True Then
i don't know what to write here
End If
Next
End If
plz help me
i get a list of products and bind it to a datalist
and there's a Compare button on the header template
and there's a checkbox in every row
when the user press compare
i want to get the product id which is selected by user
i don't have problem in wirting the code in the itemCommand the problem here
i don't know how to get the product id
this is my code
If e.CommandName = "Compare" Then
Dim str As String
For Each anitem In DataList2.Items
isChecked = CType(anitem.FindControl("chk"), CheckBox).Checked
If isChecked = True Then
i don't know what to write here
End If
Next
End If
plz help me