Sunday, 15 April 2012

asp.net - Based on the value of a session variable hide a child menu item in VB.NET -



asp.net - Based on the value of a session variable hide a child menu item in VB.NET -

how add together kid item asp:menu based on value of session variable?

i don't have clue how , i've searched net on hour. here shot @ doesn't work

dim valuepath2 string = "results|8 hr - tec 375 - dcs|ttb" if session("svuser") = "udaljrb" or session("svuser") = "yoiddl" or session("svuser") = "yoijkb" or session("svuser") = "uyrf73f" vitalsignsmainmenu.finditem(valuepath2) vitalsignsmainmenu.items.add(vitalsignsmainmenu.finditem(valuepath)) end if

i can remove items on root level, seems ignore me if set value path go deeper

here's this:

dim valuepath string = "results|8 hr - tec 375 - dcs|ttb" if session("svuser") = "uyrf73f" vitalsignsmainmenu.items.remove(vitalsignsmainmenu.finditem(valuepath)) end if

i changed path separator | instead of , , didn't matter. debugged , runs remove statement or give me "value cannot null" error, menu item still there.

c'mon microsoft why difficult?

the menu in aspx huge, menu humongous post relavant items

with code can add together kid in menuitem.

menu1 object menuitem, menutest menuitem of menu1.

example:

dim menutest = new menuitem() menutest.text = "something" menutest.navigateurl = "something" menutest.value = "something" menu1.items.add(menutest) add together kid menu1: dim kid = new menuitem() child.text = "something" child.navigateurl = "something" child.value = "something" menutest.childitems.add(child)

regards.

asp.net menu menuitem

No comments:

Post a Comment