pmcs
03-21-2012, 01:32 AM
Hi,
In my list of menus on the .aspx page, I have a menu title that has a "/" in the title("Patient Selection/Worklist").
ASPX Page:
<asp:MenuItem Text="Tools" ToolTip="Tools">
<asp:MenuItem Text="Patient Selection/Worklist" ToolTip="Patient Selection/Worklist" NavigateUrl="~/Web/PatientSelection.aspx"/>
Code Behind Page:
if (!_userSession.DbUser.IsPrimaryReviewerSomewhere)
{
MenuItem item = MainNavigationMenu.FindItem("Tools/Patient Selection/Worklist");
item.Parent.ChildItems.Remove(item);
On the code behind, I try and control if that menu item appears via the IF clause.
It doesn't like the second "/" in the menu title and throws "Object reference not set to an instance of an object exception.
I think that it interprets the 2nd "/" as another menu level("Tools/Patient Selection/Worklist")).
I have tried using the special character (/) to escape out the 2nd "/", but it doesn't work.
Any idea how to handle the 2nd / in the menu item title?
Thank You in advance,
Eric
In my list of menus on the .aspx page, I have a menu title that has a "/" in the title("Patient Selection/Worklist").
ASPX Page:
<asp:MenuItem Text="Tools" ToolTip="Tools">
<asp:MenuItem Text="Patient Selection/Worklist" ToolTip="Patient Selection/Worklist" NavigateUrl="~/Web/PatientSelection.aspx"/>
Code Behind Page:
if (!_userSession.DbUser.IsPrimaryReviewerSomewhere)
{
MenuItem item = MainNavigationMenu.FindItem("Tools/Patient Selection/Worklist");
item.Parent.ChildItems.Remove(item);
On the code behind, I try and control if that menu item appears via the IF clause.
It doesn't like the second "/" in the menu title and throws "Object reference not set to an instance of an object exception.
I think that it interprets the 2nd "/" as another menu level("Tools/Patient Selection/Worklist")).
I have tried using the special character (/) to escape out the 2nd "/", but it doesn't work.
Any idea how to handle the 2nd / in the menu item title?
Thank You in advance,
Eric