c# - how to store entire grid view into one single row of table in a database asp.net -
I have a grid view shopping cart in an application. I have a session in the form of datasource of gridview session. In the shopping cart I do not have any problems. My car is completely the way I want .. Now my problem is that when I click on the PLACEORDER button I want to export this gridvive description to the database
< Code> ---------- -------------------------------------- ------------ ----------- Ordrid | Order date | Products | Zodiac User name ------------------------------------------------ - ---------------------- xxx | Datetime.now | All products in the car | Total amount. current user ------------------------------------------------ ----------------------
The order table contains all the details about that user's order in one line
Now my question is possible to do this? If yes, how? Please explain Thank you in advance ..
You need a second table, which will contain 3 columns: 1. Table Your primary key for 2. OrderID (A foreign key for your order's table) 3. Product or Product ID.
Then you can see that you can select all the products with the given order ID. Order ordered on that order also allows you to count the products sold and other groups of other reporting. .
The wrong way to do this must be stored in the same table as a long string. No reporting is permitted from this, forcing you to parse it in your code, destroys all scalability ... this is not a bad solution.
Comments
Post a Comment