从代码后面更新rad ajax manager

时间:2013-05-20 07:31:39

标签: vb.net radajaxmanager

嗨,有人可以帮助我如何从代码后面调用(或刷新)以下控件吗?

目前,当我点击我的btnUpdate按钮时它正在工作。当我按下另一个按钮时,我想要刷新相同的用户控件(例如:btnrefresh)。

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnUpdate">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
             </UpdatedControls>
         </telerik:AjaxSetting>
     </AjaxSettings>
     <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />

<asp:Panel ID="Panel1" runat="server" Width="100%">
    <uc:EmpEnrollment runat="server" ID="EmpEnrollment" />
</asp:Panel>

1 个答案:

答案 0 :(得分:1)

只需在AjaxSetting中为btnrefresh添加另一个AjaxSettings,如下所示:

<AjaxSettings>
   <telerik:AjaxSetting AjaxControlID="btnUpdate">
      <UpdatedControls>
         <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
      </UpdatedControls>
   </telerik:AjaxSetting>
   <telerik:AjaxSetting AjaxControlID="btnrefresh">
      <UpdatedControls>
         <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
      </UpdatedControls>
   </telerik:AjaxSetting>
</AjaxSettings>