Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Need variable text in UpdateProgressContent box

$
0
0

I'm using Visual Studio 2015 with SQL Server 2014, VB.

I have the following UpdateProgressContent:

<ProgressTemplate><script type="text/javascript">
                                document.write("<div class='UpdateProgressBackground'></div>");</script><center><div class="UpdateProgressContent"
                                    style="border-width: 1px; border-style: double; background-color: #FFFFFF; font-weight: bold; left: 572px; height: 29px;">
                                Transfer to MS-Access in process...<asp:Image id="CapWait" runat="server" ImageUrl="~/Images/progress.gif"/><br />
                                (This may take several minutes to complete!)</div></center></ProgressTemplate>

It is used as multiple loops like the VB snippet below go through the database and export data on various component types (Capacitors, Resistors, Diodes, etc.) to Excel.  Tghe issue is that this takes considerable time and I would like to make UpdateProgressContent say more than "Transfer to MS-Access in process..." for the entire process.  It would be nice to say "Capacitors being exported to MS-Access..." or "Resistors being exported to MS-Access" depending upon which component type is being exported at the time.  It would let the user know progress is in fact being made.

Does anybody have any ideas or suggestions how to accomplish this?  Thanks in advance!

VB below:

        For X = 1 To R Step 1
            querystring = "INSERT INTO [Capacitors] ([PART_NUMBER], [Part Type], [Description], [Value], [PCB Footprint], [Schematic Part], [LP Viewer], [RowID]) VALUES("
            For Y = 0 To 37 Step 1
                querystring = querystring & "'" & idList(Z) & "'"
                If Y <> 37 Then querystring = querystring & ", "
                If Y = 37 Then querystring = querystring & ")"
                Z = Z + 1
            Next

            Using conn As New OleDbConnection(ConnString)
                Using cmd1 As New OleDbCommand(querystring, conn)
                    cmd1.CommandType = CommandType.Text
                    conn.Open()
                    cmd1.ExecuteNonQuery()  'Capacitors
                End Using
                conn.Close()
            End Using
        Next
        Cap = X - 1
        Tot = X - 1
        Flds = Cap * 38
        idList.Clear()

Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>