Bhavik Goyal
Bhavik Goyal

Reputation: 2796

need to loading image with css when update panel is working

I need to show my the progress image when update panel is working. Also I want to show the remaining background to deactivate.

Can you please guide me how can i achieve this using my loading.gif image and updatepanel in .net.

Thanks in advance.

Upvotes: 1

Views: 1055

Answers (1)

Sachin
Sachin

Reputation: 2148

Its simple.

Here is the code for Update Progress Panel

<asp:UpdateProgress ID="UpProgress" AssociatedUpdatePanelID="up" DisplayAfter="0"
    runat="server">
    <ProgressTemplate>
        <div align="center" class="contactmain">
            <img id="Img1" src="~/frontimage/loading.gif" runat="server" />
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>

and css for that

.contactmain
{
 position: fixed;
 z-index: 1001;
 top: 0px;
 left: 0px;
 vertical-align: middle;
 text-align: center;
 width: 100%;
 height: 600px;
 opacity: 0.7;
 filter: alpha(opacity=70);
 background-color: Gray;
 background-image: none;
 background-repeat: no-repeat;
 display: block;
 border: solid 1px black;
 padding: 100px 0 0 0;
}

Upvotes: 2

Related Questions