Ok its pretty simple what I'm trying to achieve, yet its just not working hehe!
I've got a number of checkboxes. The value behind each checkbox corresponds to a particular colour ID in the database. When the user clicks the checkbox, I want to fire off a procedure and parse the value of the clicked checkbox to that procedure.
Here's the checkbox code:
And for test purposes I've created an UpdateCheckboxStatus procedure which will pop up a message box of the colour selected:
I'm pretty new to asp.net and haven't got a foggiest clue how to send the value of the checkbox ticked! Anyone make any suggestions please
I've got a number of checkboxes. The value behind each checkbox corresponds to a particular colour ID in the database. When the user clicks the checkbox, I want to fire off a procedure and parse the value of the clicked checkbox to that procedure.
Here's the checkbox code:
<itemtemplate>
<tr>
<td width="25%" class="TableRowsAlt"><%#Container.dataitem("Colour")%></a></td>
<td width="25%" class="TableRowsAlt"><asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="UpdateCheckboxStatus('<%# DataBinder.Eval(Container.DataItem, "ID") %>')" value='<%# DataBinder.Eval(Container.DataItem, "ID") %>'/></td>
</itemtemplate>
And for test purposes I've created an UpdateCheckboxStatus procedure which will pop up a message box of the colour selected:
Code:
Sub UpdateCheckboxStatus(ByVal iColour As Integer)
MsgBox(iColour)
End Sub
I'm pretty new to asp.net and haven't got a foggiest clue how to send the value of the checkbox ticked! Anyone make any suggestions please
Last edited: