I have a gridview connected to a database and I added a checkbox next to each row. This is my code so far.
<asp:TemplateField HeaderText="Assign" ShowHeader="True"> <ItemTemplate> <asp:CheckBox ID="assignCheck" runat="server" CausesValidation="false" CommandName="Assign"/> </ItemTemplate> </asp:TemplateField>
Each row in my table holds a different user. My project is to assign a user to one of four supervisors. So what I want to do is have a drop down menu in which the user selects the supervisor. Then they go down the page checking the boxes next to the user. When they are done, they click a button, and the table now displays the supervisors name next to all the users that were selected through the check box.
How would I go about doing this? How do you get the index of the check box that is selected so that you can work with that number? I use c# by the way in visual web developer.