Hi, perhaps someone can help me with this, or suggest an alternative way of getting it done...
I have a checkbox that is part of a datalist. A snippet of my code is as follows:
Code:
<asp:datalist id="mydataList" runat="server" repeatDirection="Horizontal" RepeatLayout="Flow">
<ItemTemplate>
<asp:checkbox ID="chkBookmark" Visible="True" Runat="server" Text='Bookmark' checked='<%# DataBinder.Eval(Container.DataItem, "Bookmark") %>' autopostback=true OnCheckedChanged="testing">
</ItemTemplate>
</asp:datalist>
My problem now is in writing the testing sub-routine...
I need to write the new updated checkbox value back to the database that I have bound the datalist to.
I've tried using the following:
Code:
Protected sub testing(ByVal sender As Object, ByVal e As System.EventArgs)
However, I'm stuck as I do not know how to get the required information like which is the affected row and etc.
I know how to get around this problem using command buttons, but that would be my last resort as I would want to use the checkbox instead.
Any help is greatly appreciated.
Thanks.
Scripts82