N
Nilla
Hi!
Im trying to disable/enable menu items in my webproject depending on
some values.
The menu is defined in a masterpage and has a sitemap associated to
it.
I have written some code in mymaster.master.cs for the
myMenu_DataBound()-method that disables the manuitems as I want to.
protected void myMenu_DataBound(object sender, EventArgs e)
{
foreach (MenuItem mi in issueMenu.Items)
{
if ("this and that" ) //blabla.... you got the point
mi.Enabled = true;
else
mi.Enabled = false;
}
}
This works fine. But when the user changes some parameters in the
site, the disabled menuitems should be enabled again - how do I make
myMenu_DataBound to be "re-run"? (A refresh on the page will not do
it)
Thanks in advance!
/Nilla
Im trying to disable/enable menu items in my webproject depending on
some values.
The menu is defined in a masterpage and has a sitemap associated to
it.
I have written some code in mymaster.master.cs for the
myMenu_DataBound()-method that disables the manuitems as I want to.
protected void myMenu_DataBound(object sender, EventArgs e)
{
foreach (MenuItem mi in issueMenu.Items)
{
if ("this and that" ) //blabla.... you got the point
mi.Enabled = true;
else
mi.Enabled = false;
}
}
This works fine. But when the user changes some parameters in the
site, the disabled menuitems should be enabled again - how do I make
myMenu_DataBound to be "re-run"? (A refresh on the page will not do
it)
Thanks in advance!
/Nilla