Click here to Skip to main content
15,888,302 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please can anyone help out

I want to dynamically add and remove values(one after the other)
to an IList collection on a button click and also display the
values in a gridview

What should i do??

Someone help me out
Posted

1 solution

Create a button click event handler, add the item to the list, then data bind the grid view. If you have a specific problem, let us know. If you don't know how to do any of that, buy a book on ASP.Net... then study it (and not just the covers... the pages too).
 
Share this answer
 
Comments
Jondo24shoots 9-Oct-10 0:08am    
i have done all that u've stated
but i want to create an IList and populate it
with value from textboxes dynamically

e.g

IList<string> list = new IList<string>()
list.Add(new String{Textboxname=value, Textboxname = value};

Something close to this

But when u click the button it should
be able to be adding the value to the GridView
It should also be able to remove from the gridview

etc
Jondo24shoots 9-Oct-10 0:15am    
i have done all that u've stated but i want to create an IList and populate it with value from textboxes dynamically e.g

IList<string> list = new IList<string>()
list.Add(new String{Textboxname=value, Textboxname = value});

Something close to this But when u click the button it should be able to be adding the value to the GridView It should also be able to remove from the gridview
AspDotNetDev 9-Oct-10 23:58pm    
So what part are you having trouble with? Can you not get the value in a textbox? Do you not know how to search through a list and remove an item?

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