The postback of several actions to control the TreeView in IE WebControl alone
Source: Internet
Author: User
treeview|web| control in the use of this TreeView is often required to postback the action to the server to do some data operations, such as onexpanded or Selectindexchange. The TreeView control provides a AutoPostBack property to set whether the TreeView needs to perform postback action to get the background to manipulate the data. But once this property is set to True, all the actions of the TreeView will postback back to refresh the page, either expaned or Selectindexchangek postback back. Most of the time we just need to postback some of these things back. If all events are postback, it will not only affect the user experience but also affect system performance. The way to solve this problem is to deal with the postback of each action, if the conditions are not postback, as far as possible to reduce unnecessary postback.
Here's an example of how to control postback's movements.
Build the subtree yourself according to the selected target
}
In the code above, most of the registetreescript () functions are client script, but these client scripts cannot trigger the postback of the page, so you need to call GetPostBackEventReference (Tvschema To generate a postback script, but this function is not just a return to __doPostBack (' Tvschema ', '), the string is so simple. When there is no other postback action on your page WebControl, he automatically generates that __doPostBack client script.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.