I'm using Visual Studio 2015 with SQL Server 2014, VB.
I have a case where multiple SQL database tables are exported. I would like the update panel to give progress by means of a changing message. When the "Capacitors" table is exporting then the message would be "Capacitor export in progress...", When the"Connectors" table is exporting the message would change to "Connector export in progress...". I have the following but it is not working as expected. Each button_click should be able to change "Comp" to the appropriate value but nothing happens. However, if I change the top line to Protected Shared Comp as String = "Capacitors" then at least I get a text output but it cannot be changed. Does anybody have any suggestions how I can obtain the desired results?
Thanks in advance!
.aspx file below:
Protected Shared Comp As String
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Comp = "Capacitors"
... more operations ...
End Sub
Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Comp = "Connectors"
... more operations ...
End Sub
<asp:UpdatePanel ID="UpdatePanel1" runat="server" style="width:750px;" UpdateMode="Conditional"><ContentTemplate><fieldset style="width:750px;"><asp:Button ID="Button3" runat="server" Text="Export" OnClick="Button3_Click" Style="width: 56px" /> <asp:Label ID="Label1" runat="server" Text="Capacitors"></asp:Label> <div style="display: inline-block"><asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"><ProgressTemplate><script type="text/javascript">
document.write("<div class='UpdateProgressBackground'></div>");</script><span class="UpdateProgressContent"
--- The line below should be able to change <%= Comp %> to "Capacitors" or "Connectors" depedning on which table is exporting.
style="background-color: #FFFFFF; font-weight: bold; left: 572px; height: 29px;"><%= Comp %> export in process...<asp:Image ID="CapWaitCap" runat="server" ImageUrl="~/Images/progress.gif" /></span></ProgressTemplate></asp:UpdateProgress></div></fieldset></ContentTemplate></asp:UpdatePanel>