I am developing a Search Web Part for a WSS 3.0 site in Visual Studio 2008. The user types in their search criteria, then clicks OK. In the Click event, I am iterating through every Site Collection in the current Web Application and showing all information that matches the search. What I would like to do, is show one line at a time, such as "Searching xxx", until that site has been searched, then show the results for that site. Then I would continue with the next site. Currently, nothing is displayed until all sites have been searched.

The whole point is, I want the user to see periodic results on the page while they are waiting. What is the best way to dynamically update a Web Part during a long operation?

  • 1
    Why can't you just query the search index itself? This would be almost instant and eliminate the need for this entirely
    – Dave Wise
    Jun 14, 2012 at 14:08
  • Because the search index does not do what I want, in any way. For one thing, it only searches entire words. If this post was in a SharePoint list, and I search for "Appl" or "Cigar", it would return no results. Only if I search for "Application" or "CigarDoug", would it return this post. What happens when a user only knows part of a serial number? Also, I want to display the results within a Web Part on the page, and not take the user to another page to see results. Also, I want to customize how the search results look, what columns are returned. That is why.
    – CigarDoug
    Jun 19, 2012 at 15:03

1 Answer 1


You could use a javascript timer and an update panel or icallbackeventhandler to update the content on the screen every 5 seconds or so.

  • Would this work within a click event?
    – CigarDoug
    Jun 19, 2012 at 15:05
  • I don't see why not. Jun 19, 2012 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.