Hi guys,
Let's say that in the HTML with the help of an UpdatePanel I have the "loading" animated gif running while ASP.NET is processing data from a webservice.
I'm just wondering if there is a way to implement an Event in the .NET code that can be listen from the HTML code, like:
I'm requesting Persons data from a WebService, one by one, and I wanted to the loading text in the HTML side shows.
Importing person 1
Importing Person 2
Importing Person 3
All Done!
and out
Is there any trick to do this?
right now I have this in my HTML Code
the HEAD part
<script type="text/JavaScript" language="JavaScript">
function pageLoad() {
try {
var manager = Sys.WebForms.PageRequestManager.getInstance();
manager.add_endRequest(endRequest);
manager.add_beginRequest(OnBeginRequest);
manager
}
catch (err) {
}
}
function OnBeginRequest(sender, args) {
$("#loadingText").html("<img src='_assets/img/animated/parweb_loading.gif' alt='' /> " + strLoadingText);
}
function endRequest(sender, args) {
}
</script>
the BODY parts has:
<asp:UpdateProgress AssociatedUpdatePanelID="pnlAllIn" runat="server" ID="pnlUpdating">
<ProgressTemplate>
<div id="loadingText" style="background-color: Red; position: absolute; width: 200px;
top: 0px; right: 20px; padding: 5px; color: White; text-align: center; vertical-align: middle;
font-size: 14px;">
</div>
</ProgressTemplate>
</asp:UpdateProgress>
Thank you for the help.