Hi, so I’m a first year student in college and I have to do an app dealing with different transactions. I’m trying to add elements to a list when I click an “Accept” button. However the elements in the list are not added on to each other, the list is replaced
every time I click the button. I don’t have the code when me right now but I basically declare a list, and then within the Accept button handler I add items to the list, then I use a for loop to display that information.
I want to the elements in the list to update on to each other as I click the button for the duration of the app running. How would I go about doing this ?
Before I could help you to solve the problem, could you please let me know few information?
If your project is a Winforms or Webform project?
What are the elements that you want to add to a list?
Since you don't have the code currently, it would be even more important to have a clearer illustration.
Otherwise, I suggest you write a very simple demo which we could read and understand the target you want to achieve. It does not matter if the demo cannot run but just show us your purposes/problems.
Best regards,
Sean
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
None
0 Points
1 Post
Need help with List array updating c#
Apr 09, 2020 11:46 AM|MartyWhoop|LINK
I want to the elements in the list to update on to each other as I click the button for the duration of the app running. How would I go about doing this ?
Contributor
3010 Points
886 Posts
Re: Need help with List array updating c#
Apr 10, 2020 05:31 AM|Sean Fang|LINK
Hi MartyWhoop,
Before I could help you to solve the problem, could you please let me know few information?
Since you don't have the code currently, it would be even more important to have a clearer illustration.
Otherwise, I suggest you write a very simple demo which we could read and understand the target you want to achieve. It does not matter if the demo cannot run but just show us your purposes/problems.
Best regards,
Sean