In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what the principles and attributes of UpdatePanel in ASP.NET AJAX Extensions are. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
I. Overview of UpdatePanel controls in ASP.NET AJAX Extensions
UpdatePanel can be used to create rich local update Web applications, it is a very important control in ASP.NET AJAX Extensions, its power is that it does not need to write any client script, as long as a few UpdatePanel controls and a ScriptManager control are added on a page, local updates can be realized automatically. A simple definition of UpdatePanel is as follows:
II. How UpdatePanel works
UpdatePanel's work depends on ScriptManager server controls and client PageRequestManager classes (Sys.WebForms.PageRequestManager, specifically mentioned later in the client class). When partial page updates are allowed in ScriptManager, it will be sent back to the server asynchronously. Unlike the traditional full page backhaul, only the part of the page contained in the UpdatePanel will be updated after returning HTML from the server. PageRequestManager replaces code snippets that need to be updated by manipulating the DOM object.
Take a look at the schematic diagram of UpdatePanel available on the official website:
Three. ContentTemplate property
The Contente Template tag is used to define the content of the UpdatePanel, and any ASP.NET element can be placed in it. If you want to use programming to control the content in UpdatePanel, you need to use ContenteTemplateContainer, as described below
IV. ContentTemplateContainer property
If you want to set up the content in UpdatePanel programmatically, you need to create a UpdatePanel and add controls to ContentTemplateContainer, but not directly to ContentTemplate. If you want to set ContentTemplate directly, you need to write a custom Template and implement the interface ITemplate under the System.Web.UI namespace.
Five. Triggers attribute
There are two kinds of Triggers in ASP.NET AJAX: AsyncPostBackTrigger and PostBackTrigger,AsyncPostBackTrigge are used to specify a server-side control and the server-side events that it will trigger as asynchronous update triggers for the UpdatePanel. The properties it needs to set are control ID and server-side control events; and PostBackTrigger is used to specify a server-side control in UpdatePanel, which causes a loopback instead of asynchronous loopback, but still the traditional full-page loopback. This is very different from Atlas, and we need to pay attention to it. Looking at a small example, although both Button are placed in UpdatePanel, because Button2 is specified in PostBackTrigger, it still uses full-page loopback.
About the principles and attributes of UpdatePanel in ASP.NET AJAX Extensions is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.