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.
wht u mean by "path on top of the page"
You mean a Menu?
Try BreadCrumb. Take a look here: http://www.codeproject.com/aspnet/breadcrumbs.asp
-Baan
-Baan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Private Sub GetTierNames(ByVal ProductID As Integer)
Dim cnn As New OleDb.OleDbConnection(Conf igurationS ettings.Ap pSettings( "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.N ame,Tier2. Tier1ID,Ti er2.Name,T ier2.Tier2 ID,Tier3.N ame,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(CommandB ehavior.Cl oseConnect ion)
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?Tier 3ID=" & 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
Dim cnn As New OleDb.OleDbConnection(Conf
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.N
"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(CommandB
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
If Not dr("Tier2.Name") Is DBNull.Value Then
Hyperlink3.Text = CStr(dr("Tier2.Name"))
End If
Me.Hyperlink4.NavigateUrl = "DisplayProducts.aspx?Tier
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