I am using following expression.
int index = Convert.ToInt32(e.CommandArgument);
I want to get the row index, but the value of index is coming like 0x000000
something.
I am using following expression.
int index = Convert.ToInt32(e.CommandArgument);
I want to get the row index, but the value of index is coming like 0x000000
something.
Try this:
int index = 0;
int.TryParse(e.CommandArgument as string, out index);
Not sure from your question in which context you're trying to obtain the index, but in the RowDataBound event handler, you would get the index as described here: