English 中文(简体)
ASP.NET 动态的GridView在挽救300+浏览器时没有反应。 BtnSave_Click 事件向150个牢房发射
原标题:ASP.NET Dynamic GridView becomes unresponsive when saving 300+ rows. BtnSave_Click event fired with 150 rows

我有一个伙伴关系。 NET网络应用软件,用户可以动态地增加GridView的浏览量。 每一行都有文字箱和检查箱。 新行的数目是根据用户的要求创建的,没有动态地安置新行。 然而,Im在试图挽救数据时遇到问题。

问题:

The btnSave_Click event works perfectly with a small number of rows, but the page becomes unresponsive when attempting to save 300+ rows. I ve disabled ViewState for the GridView to reduce data size, and I suspect this may be contributing to the problem.

详细情况:

  1. Each row in the GridView contains textboxes and checkboxes that users fill out.
  2. ViewState for the GridView is intentionally disabled to reduce data transferred between the client and server.
  3. The issue is consistent across multiple browsers.
  4. No specific error messages are logged during the unresponsiveness.

Page should able to handle more number of rows.

问题回答

Well, I never seen a web site that shoves out 300 rows to the user, have you?

问题太大。

Introduce a datapager, and that will reduce the markup sent to the browser.

然而,铭记一个数据页将把300个记录从数据库中删除,但只向浏览器发送20个浏览器(或不管你的页数)。 然而,由于NOT限制从数据库中提取的数据,因此数据页数是一udge。

So, for great performance you want to address both issues. They are reducing the data base rows pulled, and then reducing the rows sent to the browser.

I mean, how does any database system work? The simple matter be it web based, accounting systems, or whatever?

你们把一行拖.。

由于增加一个数据页比较容易,因此,让NOT使用一个数据页,用于电网观测,但滚动我们自己的定制页面。

We do this, since we going to edit a table with 150,000 rows.

我们的目标应该是不让纽约市推迟或反应时间超过1/2(我们只是给我们的用户带来压力)。

Furthermore, we not going to use ajax, or any client code to speed this up. I will pop a dialog (jQuery.UI one) to edit a row, but that has ZERO impact on the performance.

因此,有15万个牢房,简单的《基本法典》法典(我仍然像基本法典一样,业绩是弹性的)。

So, here is how the example code runs:

请注意,您的NEVER认为,ANY的拖延甚至接近第1/2号,但我们正在编辑一个有15万分的数据的表格。

I moved out the load data button to a button, just to show that I am NOT starting the page out with loaded data, but wanted to demonstrate that we are loading the data, and how fast the table loads.

So, then we have this:

“entergraph

Note close how fast the page loaded.

说明向下页工作的速度。

注意红.的加速度,以及储蓄纽吨的速度。

So, I m taking a coffee break, and when I get back, I ll post some of the code I used to load up the above. However, there is no real special code, but like any good database application (desktop or web), the simple concept is to limit data pulled from the database. And for web based, then limiting the rows pulled into the browser is important, since compared to desktop software?

在 desktop地,你有一个能够直接写到显示记忆的邮联。

In web land, you’re having to send the HTML to the client-side browser, and that is thus a VERY limited resource that you have to take care off, and not send 300 rows of data to that slow display. This is not a desktop display, but you are sending a character stream over the internet to some browser. As a result, you can’t send a lot of data. However, be it old FoxPro days, MS-Access or now web based software? The rules for good performance are all the same. We can’t pull too much data, but with web based software, then the bottle neck is the display device, which is a browser on the other end of the internet, and it is several 1000 times slowed then a memory based monitor attached to your computer and CPU.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签