在运行过程中显示计数 [英] Show count while process in running

查看:48
本文介绍了在运行过程中显示计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

在我的Web应用程序中。有更新过程,这是长期运行

喜欢更新60记录和60次点击数据库

我想显示消息到用户屏幕,其中一个60完成.. ./60完成..如何实现这一点请帮助

我这样做

Hi
In my Web application. There is updataion process which is long running
like updating 60 record and 60 hits to the database
I want to display the message to user screen that 1 of 60 complete... 2 of 60 complete ..how do I achieve this please help
I am doing like this

Response.Write("Countdown: " + counter);

                    counter++;







Ankita Mali




Ankita Mali

推荐答案

第一个答案在这里 [ ^ ]可以给你一个想法。
First answer here[^] can give you an idea.


你不应该使用Response.Write()

i会建议你把结果放在
you should'nt use Response.Write()
i would suggest you to put the result in a

标签上



1 : :创建一个div并将runat属性设置为server



tag

1: : Create a div and set the runat attribute to "server"

<div id="mydiv"  runat="server"></div>





2 :在代码中behinde(如果你使用像dataReader这样的东西)







2: in the code behinde (if you using something like dataReader )


int C=0;
while(dr.Read())
{

C++;
 mydiv.innerHtml(C.toString());

}


这篇关于在运行过程中显示计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆