here's the VB, thanks for the help, I'm new at this Public Class ProductDetailsPage Inherits System.Web.UI.Page Protected WithEvents ModelName As System.Web.UI.WebControls.Label Protected WithEvents ProductImage As System.Web.UI.WebControls.Image Protected
WithEvents UnitCost As System.Web.UI.WebControls.Label Protected WithEvents ModelNumber As System.Web.UI.WebControls.Label Protected WithEvents addToCart As System.Web.UI.WebControls.HyperLink Protected WithEvents desc As System.Web.UI.WebControls.Label Protected
AlsoBoughtList As C_AlsoBought #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region '******************************************************* ' ' The Page_Load event on this page is
used to obtain ' product information from a database and then update ' UI elements with them. ' ' Note that this page is output cached at 1 minute ' intervals. This eliminates the need to hit the database ' on each request to the page. ' '*******************************************************
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Obtain ProductID from QueryString Dim ProductID As Integer = CInt(Request.Params("ProductID")) ' Obtain Product Details Dim products As IBuySpy.ProductsDB
= New IBuySpy.ProductsDB() Dim myProductDetails As IBuySpy.ProductDetails = products.GetProductDetails(ProductID) ' Update Controls with Product Details desc.Text = myProductDetails.Description UnitCost.Text = String.Format("{0:c}", myProductDetails.UnitCost)
ModelName.Text = myProductDetails.ModelName ModelNumber.Text = myProductDetails.ModelNumber.ToString() ProductImage.ImageUrl = "ProductImages/" & myProductDetails.ProductImage addToCart.NavigateUrl = "AddToCart.aspx?ProductID=" & ProductID AlsoBoughtList.ProductID
= ProductID End Sub End Class
None
0 Points
9 Posts
Re: Removing "review this product"
Dec 12, 2003 03:27 PM|johnnyek|LINK