I'm designing like a shopping cart and have a product list which is an xml file consisting of products and prices which is loaded into a dataset then bound to a datagrid
There are buttons next to each product by clicking one of these should direct the user to another form showing the choice of product and price in textboxes, I can't load the info into the next form using session variables
My code is below
1st form code
As you can see I'm trying to create the session variables before the next form is loaded but unsure on the coding for this and for the next form which should load the session variables in the product and price textboxes
Any advice would be appreciated
Thanks
There are buttons next to each product by clicking one of these should direct the user to another form showing the choice of product and price in textboxes, I can't load the info into the next form using session variables
My code is below
1st form code
VB.NET:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Set the path of XML file and schema
Dim strPath As String = Server.MapPath(".")
' Declare a dataset
Dim dsProducts As New DataSet
' Apply the XML schema to the dataset
dsProducts.ReadXmlSchema(strPath & "\Products.xsd")
' Read the XML into the data set
dsProducts.ReadXml(strPath & "\Products.xml")
DataGrid1.DataSource = dsProducts
DataGrid1.DataBind()
Session("Products") = dsProducts.Tables(0)
End Sub
Private Sub btnJam_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnJam.Click
Response.Redirect("order.aspx")
End Sub
Any advice would be appreciated
Thanks
Last edited by a moderator: