Click here to Skip to main content
16,017,623 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to show loading image in content page., i used master page, where i have to write loading process code.,. in content page when ever i click button exist in the page the loading image should show a sec's then page should come
Posted
Updated 6-Jul-12 2:59am
v2

You can use Update Progress of AJAX controls.

Have a look at these samples to understand the implementation and working of Update Progress:
MSDN: UpdateProgress Control Overview[^]
CP: The UpdateProgress Control of ASP.NET AJAX Extensions[^]
AJAX.NET UpdateProgress control[^]
ASPNET Tutorial: Introduction to AJAX UpdateProgress Control in ASP.NET and C#[^]
 
Share this answer
 
Comments
[no name] 6-Jul-12 1:26am    
My 5+
Umapathi K 6-Jul-12 2:59am    
i used master page., should i have to use every pages all coding which is enable to show progress?
Sandeep Mewara 6-Jul-12 3:49am    
Updateprogress is tied to an update panel. So, the code will be related to it. If update panel is in master page, code related will be there. If update panel to any specific page then update progress related to that update panel code will be in that page.
Umapathi K 6-Jul-12 9:00am    
where i have to write coding ., in master page or in content page?
you dont need to use ajax.if you don't implement AJAX
you can put a javascript and image in master page.

///master page
<script>
function showhide(a){
if (a){
//myimage.visible=true;
//myimage.style....
}else{
//myimage.visible=false;
}

}

</script>
<img id="myimage" src="......">

body onload function can hide the image.

<body önload="showhide(false);">
/// master page end


you can set onclientclick

< button onclientclick="showhide(true);" ></body></img>
 
Share this answer
 
v2
Comments
Umapathi K 7-Jul-12 0:42am    
its not working fine, by default its showing in master page.,
Add following code in master page immediately after opening form tag.
ASP.NET
<asp:updateprogress runat="server" id="upMainProgress" xmlns:asp="#unknown">
        <progresstemplate>
            <div style="margin: 0 auto; width: 100%;">
                <div id="load">
                </div>
                <div id="visibleDivProgress">
                    <img src="images/loading.gif" alt="Please Wait..." />
                </div>
            </div>
        </progresstemplate>
    </asp:updateprogress>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900