Thanks, here is the code behind my aspx and the user control. All of my user
controls are pretty much the same. They are just navigational links.
'CODE BEHIND
Imports System.Data
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 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 ReviewList As C_ReviewList
Protected WithEvents Price3 As System.Web.UI.WebControls.Label
Protected WithEvents Price1 As System.Web.UI.WebControls.Label
Protected WithEvents Price2 As System.Web.UI.WebControls.Label
Protected WithEvents infoDrp As System.Web.UI.WebControls.DropDownList
Protected AlsoBoughtList As C_AlsoBought
Dim ProductID2 As Integer
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"))
ProductID2 = ProductID
' Obtain Product Details
Dim products As ProductsDB = New ProductsDB()
Dim myproductinfo As SqlClient.SqlDataReader =
products.GetProductInfo(ProductID)
If myproductinfo.Read Then
infoDrp.DataSource = myproductinfo
infoDrp.DataTextField = "Spec"
infoDrp.DataValueField = "SpecID"
infoDrp.DataBind()
infoDrp.Items.Insert(0, New ListItem("Please Choose", "0"))
infoDrp.SelectedIndex = 0
End If
End Sub
Private Sub infoDrp_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles infoDrp.SelectedIndexChanged
addToCart.NavigateUrl = "AddToCart.aspx?ProductID=" & ProductID2 &
"&SpecID=" & infoDrp.SelectedItem.Value
End Sub
End Class
'USER CONTROL CODE BEHIND
Public MustInherit Class C_Header
Inherits System.Web.UI.UserControl
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class