Hello,
I am having trouble with a nested if statement that i need to implement within a menu bar. The menu loads items from a databases dependent on whether or not a customer holds a contract for this specific product, if the customer holds the contract then the submenu item is displayed.
My problem is a certain product type needs to be split, although the contracts are of the same type. I would like to load up a further sub menu item if a customer has access to a different particular product.
My code for reading in the menu items is as follows:
for each objItem in session("services")
if objItem.Value = "yes" then
menuText = menuText & "<div class=""navSub""><a href=""show.aspx?show=1&id=" & objItem.Key & "&menu=1"" class=""sub"">" & session("AllServices").Item(objItem.Key) & "</a></div>"
end if
This code checks to see if a member has a contract to a specific product and if it does then it displays the particular submenu so the customer has access to it
I would like to display a further product if a customer has a contract for product 7. So, simplified if the customer has a contract for product 7, also display product 9 within the submenu so the customer may access it.
Would this nested if statement work????
for each objItem in session("services")
if objItem.Value = "yes" then
menuText = menuText & "<div class=""navSub""><a href=""show.aspx?show=1&id=" & objItem.Key & "&menu=1"" class=""sub"">" & session("AllServices").Item(objItem.Key) & "</a></div>"
if session("services").Item(objItem.Key) = "7" then
menuText & "<div class=""navSub""><a href=""show.aspx?show=1&id=9&menu1"" class=""sub"">" EWS "</a></div>"
end if
end if
My knowledge regarding session states is poor, and i would appreciate any help. thank you
I am having trouble with a nested if statement that i need to implement within a menu bar. The menu loads items from a databases dependent on whether or not a customer holds a contract for this specific product, if the customer holds the contract then the submenu item is displayed.
My problem is a certain product type needs to be split, although the contracts are of the same type. I would like to load up a further sub menu item if a customer has access to a different particular product.
My code for reading in the menu items is as follows:
for each objItem in session("services")
if objItem.Value = "yes" then
menuText = menuText & "<div class=""navSub""><a href=""show.aspx?show=1&id=" & objItem.Key & "&menu=1"" class=""sub"">" & session("AllServices").Item(objItem.Key) & "</a></div>"
end if
This code checks to see if a member has a contract to a specific product and if it does then it displays the particular submenu so the customer has access to it
I would like to display a further product if a customer has a contract for product 7. So, simplified if the customer has a contract for product 7, also display product 9 within the submenu so the customer may access it.
Would this nested if statement work????
for each objItem in session("services")
if objItem.Value = "yes" then
menuText = menuText & "<div class=""navSub""><a href=""show.aspx?show=1&id=" & objItem.Key & "&menu=1"" class=""sub"">" & session("AllServices").Item(objItem.Key) & "</a></div>"
if session("services").Item(objItem.Key) = "7" then
menuText & "<div class=""navSub""><a href=""show.aspx?show=1&id=9&menu1"" class=""sub"">" EWS "</a></div>"
end if
end if
My knowledge regarding session states is poor, and i would appreciate any help. thank you