Following on from this post, I have a process which goes off and reads data for around 1500 associates, and this is threaded when the first application page is hit. This is taking around 30 seconds to complete, so rather than make the user wait, it was suggested I could maybe use ajax to show the load is progressing - users won't necessarily need to use the list each time they hit the page, so this way they can continue to work without being held up by the delay of populating.
My question is - has anyone done something similar? Is using an updateProgress panel the best way to manage this? The target is a dropdown control, and the data is stored into session when the load has finished. Currently, my code I use to populate the control is as follows:
// line label to get the tool to retry...
GetSessionList:
// atempt to get the list from session...
var listContents = (SortedList<string, string>)this.getSessionObject("ListLookup", null);
// if the object hasn't been stored...
if (listContents == null)
{
// return and try again...
goto GetSessionList;
}
// add blank item to control...
ddlAssistantsList.Items.Add(new ListItem(string.Empty, string.Empty));
// add the users to the dropdown...
foreach (var item in listContents)
{
// define new item for current associate...
var listItem = new ListItem(item.Key, item.Value);
// add associate to list...
ddlAssistantsList.Items.Add(listItem);
}
So I'm not wanting to hold the user up and make them wait for the page to load, but let the page show, only showing progress for the thread.