Click here to Skip to main content
15,922,533 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
repeater with data abind I'm use linkbutton to load more data in another page

Response.Redirect("Default3.aspx?Name="+this.Repeater1.Items[4].DataItem.ToString());



show this error message
Index was out of range. Must be non-negative and less than the size of the collection.
Posted
Comments
Suvendu Shekhar Giri 19-Nov-15 12:04pm    
Make sure that you have more than 4 i.e atleast 5 items in the repeater.
Richard Deeming 19-Nov-15 12:05pm    
So you don't have five items in your repeater. Check the number of items you do have, and change the index accordingly.

Better yet, use a <asp:HyperLink> control to provide a direct link, so that the client only has to make one request to access the other page.

1 solution

it show the same error from 0 to 4 and i have 5 items in repeater .i wanna when click linkbutton show more data in another page with taken the label vale of every raw

any one know the code
 
Share this answer
 
Comments
Richard Deeming 19-Nov-15 14:30pm    
Do not post comments as new solutions. Use the "Have a Question or Comment?" button under the question or solution you want to reply to, or the "Reply" button next to the comment you want to reply to.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900