如何在ajax中使用Loader镜像

时间:2011-06-05 08:58:39

标签: ajax c#-2.0

<asp:UpdatePanel ID="uppnl_Select_File_Format" runat="server" UpdateMode="Conditional">
<ContentTemplate>
          <div class="button-bg-2">
                            <div class="button-text-2">
                                <asp:LinkButton ID="btnCreate" ValidationGroup="CreateVersion" runat="server" OnClick="btn_Create_OnClick"
                                    CausesValidation="true">Add Title</asp:LinkButton>
                            </div>
                        </div>
</ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnCreate" />
            <asp:AsyncPostBackTrigger ControlID="ddlstMedia" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdateProgress  ID="upprogpnl" runat="server" AssociatedUpdatePanelID="uppnl_Select_File_Format">
        <ProgressTemplate>
            <asp:Image ID="img_Loading" runat="server" ImageUrl="~/App_Themes/Admin/LoadingImages/loading1.gif" />
        </ProgressTemplate>
    </asp:UpdateProgress>

按钮点击事件时不显示加载程序图像...

请回复我,我是初学者......

1 个答案:

答案 0 :(得分:1)

这是在处理时显示加载程序gif的代码

   <ProgressTemplate>

       <div   Style="z-index: 105; left: 450px;position: absolute; top: 230px" > 
       <center>
           <img  id="imgloader" runat="server" src="images/loading.gif" />
         </center>
       </div>

   </ProgressTemplate>