Hi Guys, I saw a post about this from some months ago, but I'm not sure I understand it. I'm setting a global variable that's used as the visibility property for a control. If I toggle the variable with a control that is on the same page, it works perfectly. But If I toggle the same variable with a menu click event, the control's visibility doesn't change most of the time. It does on random occasion.
Stepping through the code, I can see that the menu click event is changing the variable properly, but the fact that it's being changed from a menu click event seems to cause it to not work. It doesn't seem to matter if I initially set this global variable in the layout load event or the page load event.
Here is the menu click event code -
protected async System.Threading.Tasks.Task Menu0Click(MenuItemEventArgs args)
{
if (args.Text == "Show Set Dept") {
Globals.showUserDeptRadios = true;
}
if (args.Text == "Hide Set Dept") {
Globals.showUserDeptRadios = false;
}
}
Any thoughts?
Thank you,
Slosuenos