Click here to Skip to main content
15,562,816 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I'm doing a entry page, In which user enters data, after entering data it will be shown in repeater, for one entry it is working fine, but while binding second record the list is getting cleared.

I want to know where should i declare the list, so that the values must not get cleared.

Raajkumar.b 17-Mar-14 3:39am    
declare globally like this
static list<int> li=new list<int>();

1 solution

Question is not clear , need clarification
Share this answer
Member 10454499 17-Mar-14 0:46am    
Hello Kan,
what am doing is, before uploading data in database, am binding to repeater, so for this, i created on business object class and also list for the same class.

I'm binding the data to the business objects first and then to the list, at last the list am binding to repeater.

Now what the problem is for one record it is fine, but when am submitting more than one record, the list which already contains one record of data is getting cleared, i dont want that to get cleared i want all the records in list only, its because at the time of submitting data to the database, i will use this list to send data.

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