5
Reply

problem with gridview_rowcommand event

Dipa Ahuja

Dipa Ahuja

Mar 21 2010 11:39 AM
3.8k
hi... 

i have taken gridviw to display records and pageindex=true

it was working well...

but now i have added one buttonfield with commandname="SELECT" 

with GridView1_RowCommand event to deal with this btnfield..

when i click on this buttonfield thats working well..

but raise error when i do paging...

Error:

Input string was not in a correct format.


protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
     {
       int index=Convert.ToInt32(e.CommandArgument);

Answers (5)