Nonheandyhype
New Member
I don't know how to describe what I am looking for but i can illustrate it with diagram which I drawn.The first below here is 'user input' which will be in gridview and it will require users to input details. the (textbox) is a textbox and the details next to it is an input example.\[code\]User Inputs:Items Quantity Unit Price Total(textBox)abc (textBox)2 (textBox) 100 (textBox) 200(textBox)def (textBox)1 (textBox) 150 (textBox) 150\[/code\]After save button is clicked (I didn't show the button, sorry), the details will be saved in the database such as shown below 'save in database'. \[code\]Save in Database: ID Items Quantity UnitPrice Total10001 Abc , def 2,1 100,150 200,150\[/code\]And when the user wants to display the details, the details should show like in the below 'display results'. \[code\]Display Results:ID:10001 Items Quantity Unit Price TotalAbc 2 100 200def 1 150 150\[/code\]I hope this explanation is understandable, I am quite poor in explaining and also in ASP.please help me to code this out in C# or VB because I am out of option to do this. thank you so much. code example: \[code\]string sql = "INSERT INTO Products(Name, ProductImage, OriginalPrice, DiscountPrice, Descriptions,StockQuantity, Category) VALUES (@Name, @ProdImage, @OriPrice, @DisPrice, @Descrp, @Quantity, @Category)"; try { conn.Open(); SqlCommand cmd = new SqlCommand(sql, conn); SqlParameter[] param = new SqlParameter[7]; param[0] = new SqlParameter("@Name", SqlDbType.VarChar,100); param[1] = new SqlParameter("@ProdImage", SqlDbType.VarChar, 100); param[2] = new SqlParameter("@OriPrice", SqlDbType.Float ); param[3] = new SqlParameter("@DisPrice", SqlDbType.Float ); param[4] = new SqlParameter("@Descrp", SqlDbType.VarChar,50); param[5] = new SqlParameter("@Quantity", SqlDbType.Int); param[6] = new SqlParameter("@Category", SqlDbType.VarChar,50); param[0].Value = http://stackoverflow.com/questions/15654971/name; param[1].Value = image; param[2].Value = OriPrice; param[3].Value = disPrice; param[4].Value = description; param[5].Value = quantity; param[6].Value = Category; for (int i = 0; i < param.Length; i++) { cmd.Parameters.Add(param); } cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery();\[/code\]