同时在C#ASP.NET中处理相同的应用程序 [英] Simultaneously work on same application in C# ASP.NET

查看:72
本文介绍了同时在C#ASP.NET中处理相同的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi iam using c# asp.net web application.

i develop one web page where we do some process for 15min it take to complete.

within under that 15min i cant open onthor page on same application  it show loading page til first one is finish.

how to do simultaneously work  or open my other web page on same time first page are in process.





我尝试过:



同时在c#Asp.net中使用相同的应用程序



What I have tried:

simultaneously work on same application in c# Asp.net

推荐答案

如何:使用后台工作者 [ ^ ]



短版:

为后台worker的DoWork事件创建一个事件处理程序。

DoWork事件处理程序是你在后台线程上运行耗时操作的地方。传递给后台操作的任何值都将传递给传递给事件处理程序的DoWorkEventArgs对象的Argument属性。

要将进度报告回调用进程,请调用ReportProgress方法并传递它是一个从0到100的完成百分比。调用ReportProgress方法会引发你单独处理的ProgressChanged事件。



还有:如何在ASP.NET中运行后台任务 - Scott Hanselman [ ^ ]

为您节省一些使其适应网络的工作。
How to: Use a Background Worker[^]

Short version:
Create an event handler for the background worker's DoWork event.
The DoWork event handler is where you run the time-consuming operation on the background thread. Any values that are passed to the background operation are passed in the Argument property of the DoWorkEventArgs object that is passed to the event handler.
To report progress back to the calling process, call the ReportProgress method and pass it a completion percentage from 0 to 100. Calling the ReportProgress method raises the ProgressChanged event, which you handle separately.

There is also this: How to run Background Tasks in ASP.NET - Scott Hanselman[^]
to save you some work of adapting it to the web.


这篇关于同时在C#ASP.NET中处理相同的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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