Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/283.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在删除之前如何显示正在加载的gif?_C#_Asp.net_Gif - Fatal编程技术网

C# 在删除之前如何显示正在加载的gif?

C# 在删除之前如何显示正在加载的gif?,c#,asp.net,gif,C#,Asp.net,Gif,我在更新面板中的中继器上有一个删除按钮。当我单击删除按钮时,它可以删除,但大约需要10秒钟。所以我想添加一个加载gif。我是添加gif的初学者。请帮帮我。谢谢你的兴趣 <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:SqlDataSource ID="SqlDataSource1" runat="server"

我在
更新面板中的
中继器上有一个删除按钮
。当我单击
删除按钮时,它可以删除,但大约需要10秒钟。所以我想添加一个加载
gif
。我是添加
gif
的初学者。请帮帮我。谢谢你的兴趣

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString='<%$ ConnectionStrings:NET2ConnectionString %>' SelectCommand="SELECT * FROM [ProductsRA]"></asp:SqlDataSource>
                <asp:Repeater ID="rptuser" runat="server" DataSourceID="SqlDataSource1" OnItemCommand="rpr1_ItemCommand" OnItemDataBound="rpr1_ItemDataBound">
                    <ItemTemplate>
                        <tr>
                            <td class="GridItems">
                                <asp:ImageButton runat="server" ID="delbtn" ImageUrl="~/images/delete.gif" CommandName="Delete" CommandArgument='<%# Eval("ID") %>' ValidationGroup="ab" ToolTip="Delete User" /></td>
                            <td class="GridItems"><%# DataBinder.Eval(Container.DataItem,"ID") %></td>
                            <td class="GridItems"><%# DataBinder.Eval(Container.DataItem,"ProductName") %></td>
                            <td class="GridItems"><%# DataBinder.Eval(Container.DataItem,"Quantity") %></td>
                            <td class="GridItems"><%# DataBinder.Eval(Container.DataItem,"UnitPrice") %></td>
                            <td class="GridItems">
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="rptuser" />
            </Triggers>
        </asp:UpdatePanel>
你可以用这个

<asp:UpdateProgress ID="UpdateProgress1" runat="server"
        AssociatedUpdatePanelID="UpdatePanel1">
    <ProgressTemplate>
        <div class="loading_div">            
            <p>Please wait while we process the request.</p>
            <img src="/Images/loader.gif" />
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>

在处理请求时,它将呈现如下状态:

请提供代码示例,以便triedI将检查此控件。谢谢:)
<asp:UpdateProgress ID="UpdateProgress1" runat="server"
        AssociatedUpdatePanelID="UpdatePanel1">
    <ProgressTemplate>
        <div class="loading_div">            
            <p>Please wait while we process the request.</p>
            <img src="/Images/loader.gif" />
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>
.loading_div {
    position: absolute;
    color:#fff;
    background-color: #000;
    z-index: 2000 !important;
    opacity: 0.6;
    overflow: hidden;
    text-align: center;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    padding-top:20%;
}