I have a gridview and I am able to render textboxes, enter value and save it to the database.
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="txtSomething" runat="server" Text='<%# Bind("SOME_COL") %>'></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="10%" />
</asp:TemplateField>
<asp:TemplateField HeaderStyle-ForeColor="white"
HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="5%">
<ItemTemplate>
<asp:LinkButton Id="btnSomething" runat="server"
CommandArgument='<%# Eval("SOME_ID") %>'
CommandName="WaitPeriodSave" CausesValidation="false"
>Save</asp:LinkButton>
The command argument is SOME_ID and it might contain value 4, but it might be 2nd row on the gridview.
Can I pass more than one value in command argument? If yes, How? Also, is there a way to determine the selected row number In the above scenario it is 2 which is probably zero based so it should be 1.