Click here to Skip to main content
15,903,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I dont know how to put this, but i am working in a webappication where i have to keep records of each items purchased by the CUSTOMER.
I am thiking about using repeaters for this purpose.
the first field should be dropdownlist with list of all PRODUCTS available,
second is textbox for entering PRICE and third will be for textbox for no. of selected items.
The customer may buy various Products and I want to insert all the purchase records at once to my table. Can the Repeater control fulfill my requirement if yes how?
and if not can u please suggest some other methods.
Posted

you can use Gridview, benefit of using gridview is you can easily insert update and delete.

You can implement by having TemplateField in a Gridview.



Thanks
Ashish
 
Share this answer
 
Comments
sushil sainju 21-Jun-12 5:30am    
i dont think the grid will fulfill the purpose here.
you see i need to record items purchased by customer into DB with its price and no.(like making invoice in departmnt stores)
lets say i have 5 products in my store
1.Apple
2.ball
3.cat
4.dog
5.egg
now if the customers(ID=1001) buy apple and ball
i need to add following records in my DB
customer ID,item,item id,price,Qty
1.1001,apple,1,20,20
2.1002,ball,2,200,2
how can i take these inputs??
Is it the requirement that you need to place a single data display control on your web page? Will it be acceptable if you place a DropDownList and a GridView ? I meant to say, place a DropDownList, fill it will Customer ID/Name, on selection of any Customer, fill the GridView accordingly. Now you can easily use GridView for Add/Edit/Delete purposes.
 
Share this answer
 
v2

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