Update Label - using UpdateProgress
Revision 1
Hello Everyone,
I been trying for hours to figure out how to change the label inside the updateprogress.
when the user click send email button , it go through loop to check if the user is inside this location and if its then add the user email to the email list.
i want everytime the count inide the loop increase the label display how many emails sent.
If email <> "" Then
dcount += 1
<pre> Session("dcount") = dcount
<pre>Dim counterStatus As Label = CType(UpdateProgress1.FindControl("lblCounterStatus"), Label)
counterStatus.Text= Session("dcount") = dcount
the label never shows while it's searching
and here is my aspx
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Label ID="lblEmailStatus" runat="server"></asp:Label> <br />
<asp:Button ID="btnSend" runat="server" Style="text-align: center" Text="Send"
Width="101px" />
<asp:Label ID="lblStatus2" runat="server" Text=""></asp:Label>
<br />
<asp:Label ID="lblTimer" runat="server"></asp:Label>
<br />
</ContentTemplate>
</asp:UpdatePanel>
<%-- <asp:Timer ID="Timer1" runat="server" OnTick="Timer1_tick" Interval="500" Enabled="false">
</asp:Timer>--%>
<asp:Label ID="lblsending" Visible="false" runat="server" Text="Please do not close this page till the counter finish"></asp:Label>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel2">
<ProgressTemplate>
<asp:Label ID="lblCounterStatus" runat="server" ></asp:Label>
<br />
<img alt="progress" src="images/anim0003-1_e0.gif"/>
Sending...
</ProgressTemplate>
</asp:UpdateProgress>
Posted 9-Oct-12 6:20am
by
Mike988.