开发者

ASP.net Progress Bar that changes text

开发者 https://www.devze.com 2023-03-22 13:01 出处:网络
I need to have a progress bar that should have a text that indicates what is actually happening . This text will keep on changing based on what is currently happening .

I need to have a progress bar that should have a text that indicates what is actually happening . This text will keep on changing based on what is currently happening .

To explain a bit more , I am developing a web crawler. So the progress bar shoul开发者_如何学God display the current URL that is being crawled.

What would be the best way to do it ? AJAX or Jquery ? Just need to be simple enough. Will the existing AJAX progress bar control that comes with VS supports this ?

Thanks in Advance.


You can use Reverse Ajax technique for that

Pokkein


As far as I know, the default loading panel is shown while the current thread is blocked until server response is received at the client browser. So it would not be possible to achieve what you want using the default one. But I think you should be able to do a custom implementation. If I were you, I'd start having a timer and do regular polls to the server to get the current task. And instead of showing the default loading panel you can show the result from the timer-poll and show the result in a popup div.


AJAX or Jquery ?

Those two aren't exclusive. You could use jQuery in order to send AJAX requests at regular intervals to the server (using the window.setInterval method). The server on the other hand could update the progress during the crawling process into the Application state. So when you start the crawling process the server will return an unique id associated with it. Then it will store into the Application state every time it advances. This way the oplling could be done and the progress updated.

0

精彩评论

暂无评论...
验证码 换一张
取 消