I have a simple access control class that allows me to check that the user has permissions, then he interacts with a static variable:
private static bool canUpdate = false;
This is used when loading a protected void Page_Load page (object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
AccessControl I = new AccessControl(parameter);
canUpdate = I.HaveEdit;
}
BindGrid();
}
All this works fine, it's simple, and bool is used as part of another method (called a gridview expression) to conditionally display the control in a row. This also works great.
However, I am at the testing stage, and I realized that everything is fine with normal operations, but after some time (significant, for example, half an hour or so) the buttons no longer appear (in other words, canUpdate is false).
Code to display:
protected bool ShowNewStamps(object date)
{
if (date == null & canUpdate == true)
return true;
else
return false;
}
, , , .
, , , , ?