I am designing a shopping basket site and have a gridview on one page displaying a list of products from a database. The gridview has a column where the user can specify the quantity of the item they wish to purchase and then a button next to it with will allow them to add it to their basket. At the moment when the user select the add basket it displays the number entered in the quantity cell in a message box, as shown below.
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
Dim TextBox As TextBox
TextBox = GridView1.Rows(e.CommandArgument).Cells(5).Controls.Item(0)
MsgBox(TextBox.Text)
End Sub
I have also previously created a message box to show the item number of the product for which they selected the add to basket button for.
What I am trying to achieve is for the user to select multiple items like this and then allow them to view their basket on another page. When the user goes to this page I would like the values to be passed to a gridview on the page and displayed.
How would I go about passing values like this? Any examples would be very welcome.
Question
Divardo
I am designing a shopping basket site and have a gridview on one page displaying a list of products from a database. The gridview has a column where the user can specify the quantity of the item they wish to purchase and then a button next to it with will allow them to add it to their basket. At the moment when the user select the add basket it displays the number entered in the quantity cell in a message box, as shown below.
I have also previously created a message box to show the item number of the product for which they selected the add to basket button for.
What I am trying to achieve is for the user to select multiple items like this and then allow them to view their basket on another page. When the user goes to this page I would like the values to be passed to a gridview on the page and displayed.
How would I go about passing values like this? Any examples would be very welcome.
Link to comment
Share on other sites
4 answers to this question
Recommended Posts