So my situation is like this, what I need to happen is to show the row data that are checked on the checkbox,
I have an initial solution, what I did is assign the table data ID as a tooltip to the checkbox, and will be displayed with,
txtShow.Text = txtShow.Text + myCheckbox.Tooltip.ToString
Is there a better of doing this, cause I definitely don't want to show the data ID as a tooltip for the checkbox. I'm a junior programmer and basically trying to work my way. Thanks for all the future help.
Basically I have the following codes,
IN ASPX
<table>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<tr>
<td>
<asp:CheckBox ID="cbRows" runat="server" ToolTip='<%# Eval("ID") %>' />
</td>
<td>
<%# Eval("ProductID")%>
</td>
<td>
<%# Eval("ProductName")%>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
In my Codebehind VB,
Protected Sub bCheck_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bCheck.Click
txtShow.Text = ""
Dim i As Integer = 0
Dim item As RepeaterItem
For Each item In Repeater1.Items
Dim myCheckBox As CheckBox = item.FindControl("cbRows")
If Not myCheckBox Is Nothing And myCheckBox.Checked Then
' I put my initial code here, which uses the tooltip.
End If
i = i + 1
Next
End Sub