I’m working on a search function and am limited by my back end. I’m trying to speed it up by doing multiple small searches rather than one big search. What I am currently doing is in the OnClick event, is do the first bit of searching and return the results to a gridview. If there is more searching to be done, I use AjaxControlToolkit.ToolkitScriptManager.RegisterStartupScript to register a small function that clicks the submit button again.
This works but seems like a hack and I feel like there should be a better way. Am I missing something?
I ended up using a Timer like this:
Then in the Button’s onClick event, I started a thread running to perform the search and started the timer.
And in the timer1_Tick handler: