开发者

Display server batch progress on client

I am writing a business application using silverlight 4 including RIA. The user can start a batch progress on the server by clicking a button. On the client side, i want to display the progress. How do i do that?

开发者_运维技巧The first idea i had was to create a job manager which creates a job ticket and the client polls regularly for its status / progress. But is there an easier way?


You can try COMET Programming, which means you can open a Web Request connection to ASHX file and in that ASHX file you can send Write one line that includes a progress and flush the stream, do not close it till you reach 100%. And on client side you can keep on reading web response till you get 100%, this is better then polling since it only requires one socket connection to server for entire duration and very few bytes of data transfer.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜