Solved the problem that the associatedupdatepanelid attribute of updateprogress is not displayed after it is added (reprinted)
Note the following when updateprogress is displayed:
1. If updateprogress is in <contenttemplate> of updatepanel, the prompt information in updateprogress is displayed.
2. If updateprogress is out of <contenttemplate> of updatepanel, you must specify the associatedupdatepanelid attribute. However, the button control that triggers the event must be in <contenttemplate> of updatepanel, otherwise, you must perform step 3.
3. If the button control and updateprogress that trigger the event are both in the <contenttemplate> of the updatepanel, add the following code to the page in addition to the updatepanel ID of the associatedupdatepanelid attribute. For example:
View code
<Triggers>
<Asp: asyncpostbacktrigger controlid = "button1" eventname = "Event"/>
</Triggers>
<Script language = "JavaScript" type = "text/JavaScript">
VaR PRM = SYS. webforms. pagerequestmanager. getinstance ();
PRM. add_initializerequest (initializerequest );
PRM. add_endrequest (endrequest );
VaR postbackelement;
Function initializerequest (sender, argS)
{
If (PRM. get_isinasyncpostback ())
Args. set_cancel (true );
Postbackelement = args. get_postbackelement ();
If (postbackelement. ID = 'button1 ')
$ Get ('updateprogress1'). style. Display = 'block ';
}
Function endrequest (sender, argS)
{
If (postbackelement. ID = 'button1 ')
$ Get ('updateprogress1'). style. Display = 'none ';
}
</SCRIPT>
Reprinted from: http://www.cnblogs.com/wangduck/archive/2008/11/17/associatedupdatepanelid.html