Link to home
Start Free TrialLog in
Avatar of musclejack
musclejack

asked on

I created a asp.net page that return subcategories based on the category id. how can i create a path on top of the page look something like this: home >> category1 >> category88 >> category123 >> pr

I created a asp.net page that return subcategories based on the  category id.  how can i create a path on top of the page look something like this: home >> category1 >> category88 >> category123 >> product. Example please.
Avatar of ryerras
ryerras

wht u mean by "path on top of the page"
You mean a Menu?
ASKER CERTIFIED SOLUTION
Avatar of sukumar_diya
sukumar_diya
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Private Sub GetTierNames(ByVal ProductID As Integer)
        Dim cnn As New OleDb.OleDbConnection(ConfigurationSettings.AppSettings("SiteDB"))
        Dim cmd As New OleDb.OleDbCommand
        Dim dr As OleDb.OleDbDataReader
        Dim Tier1ID, Tier2ID, Tier3ID As Integer
        cmd.CommandType = CommandType.Text
        cmd.CommandText = _
        "SELECT Products.ProductID,Tier1.Name,Tier2.Tier1ID,Tier2.Name,Tier2.Tier2ID,Tier3.Name,Tier3.Tier3ID FROM Tier3 " & _
        "RIGHT JOIN (Tier2 RIGHT JOIN (Tier1 RIGHT JOIN Products " & _
        "ON Tier1.Tier1ID = Products.Tier1ID) " & _
        "ON Tier2.Tier2ID = Products.Tier2ID) " & _
        "ON Tier3.Tier3ID = Products.Tier3ID " & _
        "WHERE ProductID = " & ProductID.ToString()
        cmd.Connection = cnn
        cnn.Open()
        dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
        dr.Read()
        Tier1ID = CInt(dr("Tier1ID"))
        Tier2ID = CInt(dr("Tier2ID"))
        Tier3ID = CInt(dr("Tier3ID"))
        Me.HyperLink2.NavigateUrl = "Index.aspx"
        Me.HyperLink2.Text = CStr(dr("Tier1.Name"))
        Me.Hyperlink3.NavigateUrl = "DisplayTiers.aspx?Tier2ID=" & Tier2ID
        If Not dr("Tier2.Name") Is DBNull.Value Then
            Hyperlink3.Text = CStr(dr("Tier2.Name"))
        End If
        Me.Hyperlink4.NavigateUrl = "DisplayProducts.aspx?Tier3ID=" & Tier3ID
        If Not dr("Tier3.Name") Is DBNull.Value Then
            Hyperlink4.Text = CStr(dr("Tier3.Name"))
        End If

        cnn.Close()
        cmd.Dispose()
        cnn.Dispose()
    End Sub

Heres the page it produces

http://dev.savoyfurniture.com/ProductDetail.aspx?ProductID=146

Aeros