更新面板中的异步疑问 [英] Asynchronous doubt in update panel

查看:51
本文介绍了更新面板中的异步疑问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

UpdatePanel控件异步启用ASP.NET网页中的部分页面呈现。



我发现这里异步和同步...我是新手。 net



请说明这种异步意味着什么

The UpdatePanel control enables partial-page rendering in an ASP.NET Web page asynchronously.

I found everywhere this asynchronous and synchronous.. I am new to .net

Kindly explain what does this asynchronous means

推荐答案

示例:

您的gridview中有50个数据。您为页面大小为10的网格视图启用了分页。它将显示每页10条记录,每页5条记录,每条记录有10条记录。当您尝试转到gridview的第二页时,即另外10条记录,发生回发(页面)将被发布回服务器,现在非常基本的术语,页面电影.. :))。如果你将这个gridview包装在更新面板中,那么页面将不会被发回服务器,它只会显示第二页。



嗯,背后的想法是,回发发生在为了通知服务器在客户端发生了什么,以便服务器可以决定如何继续进行。在这种情况下你不需要这个,不需要服务器干扰,更新面板就可以做到这一点。



所以你所取得的成就叫做部分页面更新(只有gridview显示更新不是整页)。



此外,参考到下面的链接



什么是实际的同步/异步操作(C#5.0系列) [ ^ ]



问候:笑:
Example:
You have 50 data in your gridview. You enabled paging for that gridview with page size 10. It will display records 10 per page that is 5 pages,each with 10 records.Now when you try to go to second page of gridview,that is another 10 records,postback occurs(page will be posted back to server,in very basic terms for now,page flicks..:)). If you wrap this gridview inside update panel,then page wont be posted back to server,it will simply display second page.

Well,idea behind is,postback occurs in order to inform server what happened at client side so that server can decide how to proceed further.There will be situation where you dont want this,no need for server interference,Update Panel will do the trick.

So by this what you achieved is called Partial-page update(only gridview display is updated not whole page).

Further, refer to below link

What are actually synchronous/asynchronous operations (C# 5.0 Series)[^]

Regards :laugh:


这篇关于更新面板中的异步疑问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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