0

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.

Community
  • 1
  • 1
Martin S
  • 211
  • 1
  • 4
  • 18
  • Ajax would can be the good bet here. This can help you http://stackoverflow.com/questions/14681058/how-to-make-the-1st-part-of-the-site-loads-first-like-in-google-pagespeed/14681322#14681322 – Pawan Nogariya Mar 12 '13 at 12:46
  • Thanks @PawanNogariya, though that talks about php, not c#. I'll read your link in more detail to see if I can work it into what I'm trying to do. – Martin S Mar 12 '13 at 13:03
  • C# or PHP is not playing big role in what I tried to explain and what was asked in the question, it was all about jquery and lazy loading. You will just be doing the same thing in asp.net what someone will do in php. The only part changing will be the jquery's one. – Pawan Nogariya Mar 12 '13 at 14:33
  • Thanks, but am none the wiser I'm afraid. I've found an example elsewhere which I'm looking at now. – Martin S Mar 12 '13 at 15:39

0 Answers0