I'm using Visual Studio 2015 with SQL Server 2014, VB.
I have two updatepanels and I would like to find a way to execute the second as soon as the first is complete. At the end of Button3_Click (first updatepanel) I have a line to start the second updatepanel, "Button4_Click( sender, e)" but it does not work. Any suggestions?
.aspx file
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestCprog2.aspx.vb" Inherits="TestCprog2" %><%@ Import Namespace="System.Data"%><%@ Import Namespace="System.Data.SqlClient"%><%@ Import Namespace="System.Data.OleDb"%><%@ Import Namespace="System.Web.Configuration"%><%@ Import Namespace="System.Diagnostics"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs)
'Capacitors
Comp = "Capacitors"
--- SQL read/write operations ---
Label1.Text = Cap & " Capacitors exported at " & DateTime.Now.ToString()
Button4_Click(sender, e)
End Sub
Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs)
'Connectors
Comp = "Connectors"
--- SQL read/write operations ---
Label2.Text = Con & " Connectors exported at " & DateTime.Now.ToString()
End Sub
</script><html xmlns="http://www.w3.org/1999/xhtml" ><head id="Head1" runat="server"><title></title></head><body style="width: 1446px"><form id="form1" runat="server"><div><asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="0"></asp:ScriptManager><p style="font-family: 'Arial Black'; font-size: medium; font-weight: bold; font-style: normal"> Create Access copy for Home use</p><asp:Button ID="Button1" runat="server"
Text="Generate Home Use Database" /><asp:Button ID="Button2" runat="server" OnClick="Button2_Click"
Text="Return to Main" /> <asp:Label ID="Label12" runat="server" Text="Capacitors"></asp:Label> <asp:Label ID="Label13" runat="server" Text="Connectors"></asp:Label><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"
style="background-color: #FFFFFF; font-weight: bold; left: 572px; height: 29px;">Capacitor export in process...<asp:Image ID="CapWaitCap" runat="server" ImageUrl="~/Images/progress.gif" /></span></ProgressTemplate></asp:UpdateProgress></div></fieldset></ContentTemplate></asp:UpdatePanel><asp:UpdatePanel ID="UpdatePanel2" runat="server" style="width:750px;" UpdateMode="Conditional"><ContentTemplate><fieldset style="width:750px;"><asp:Button ID="Button4" runat="server" Text="Export" OnClick="Button4_Click" Style="width: 56px" /> <asp:Label ID="Label2" runat="server" Text="Connectors"></asp:Label> <div style="display: inline-block"><asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel2"><ProgressTemplate><script type="text/javascript">
document.write("<div class='UpdateProgressBackground'></div>");</script><span class="UpdateProgressContent"
style="background-color: #FFFFFF; font-weight: bold; left: 572px; height: 29px;">Connector export in process...<asp:Image id="CapWaitCon" runat="server" ImageUrl="~/Images/progress.gif"/></span></ProgressTemplate></asp:UpdateProgress></fieldset></ContentTemplate></asp:UpdatePanel><br /></div></form></body></html>