Visual Studio 2017 ASP.net C# -
I have numerous checkboxes that are filled from a database. When default page loads (and is not a postback) the lists are read from the database and placed into Caches.
Cache ACachce = new Cache();
ACachce.Insert(cacheName, ds, null, DateTime.Now.AddMinutes(10), Cache.NoSlidingExpiration, CacheItemPriority.High, null);
return ds; // a dataset
When I redirect to another page (not postback) the Caches are used to fill the checkboxes. For example:
if (chkChiefComplaint.DataSource == null)
chkChiefComplaint.DataSource = Cache["ChiefComplaint"];
Three other forms used the same checklists and read the Caches.
My problem is that often (but not always) when redirecting to another page, the checkboxes are not filled. If I return to the Default and then redirect back, the boxes are eventually filled, but it may take 2 to 3 rotations. Once the boxes fill upon a page load they always filll for any of the pages. Sometimes the boxes fill correctly the first time a redirect is made. The problem occurs in Chrome, IE, and Edge. I have used try/catches to check for any errors.
I do not know if it makes a difference, but these are Devexpress controls that are part of a Devexpress ASPX.FormLayout control.
I realize that this is a rather ambiguous problem, but any ideas or suggestions are greatly appreciated.