I have to target when i clik the link button get the index of row. However, Icannot get it.
My c# codes:
int rowIndex = Convert.ToInt32(e.CommandArgument);
when the codes comes here gives error({“Input string was not in a correct format.”}) however, it works for example when i click buttonfield. how can i do it?
asp.net codes
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButton2" runat="server" CommandName="View"><%#Eval("RSS_Title") %></asp:LinkButton>
</ItemTemplate>
I would do it something like this:
ASPX
CS