Transfondo:
I am working on a VB.NET application that makes an AJAX request to a web service.
The application has a UpdateProgress
that shows the status of the request.
This is the UpdateProgress
code:
<asp:UpdateProgress ID="uprAjaProcCompEgre" runat="server" AssociatedUpdatePanelID="upaAjaRemesas">
<ProgressTemplate>
<asp:Label ID="lblProcesando" runat="server" Text="Procesando..." Width="88px" CssClass="cssLabel" />
<br />
<asp:Image ID="imaProcesando" runat="server" ImageUrl="/Imagenes/camión.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
While the user waits, a gif is displayed with a Label (which has a default text) .
The default text is: Procesando...
.
Example:
Problem:
In javascript I get the Label
(whose class is cssLabel
) to change the text:
Example:
document.getElementsByClassName('cssLabel')[0].innerText = "Enviando información...";
Even though I check that the text is modified in the Label
, the text is NOT updated on the screen - (still see the text "Processing ...").
In this source it is requested that the Label be outside the UpdateProgress, but, this is not an option as there would be than changing the current design and this change is not viable.
I would like to know how to change "or update" the (modified) text of a Label contained in an UpdateProgress in VB.NET (without involving any logic in the back-server) 1 .
1 This is because (after sending data), the response of the service is sent to the back to continue with other activities.