ASPX page does not show
-
I have a .aspx page that does an import and housekeeping when the linkbutton is clicked. This can take up to a minute to complete if successful. For days I have struggled to find the way in which I will let the user know what the status of the import is. Eventually I have managed to load a result page into either an iFrame, or another frame in a frameset. I expected that when that page loads, while the calling page's process is still running, it would load on a different thread and display the status at that time. But, it does not matter what I do, I cannot get the result page to display until the process has not completed in the calling page. When the process is completed, it states that the process has failed or was successful as I want it to work. Yet, when I need to tell the user that the process is busy, it is simply not displayed until the process is done. Here is a piece of code from my .aspx page. My problem lies on the line with comment "'<----- Does not show" --------------------------------------------------------------------------------------- Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click Dim url As String Dim FName As String Dim Env As String Dim FYear As Integer FName = txtFile1.PostedFile.FileName Env = cmbEnv.SelectedItem.Value FYear = cmbStartDate.SelectedItem.Text If FName = "" Or Right$(FName, 4) <> ".csv" Then url = "wfResult.aspx?iMessage=Please select a vald file&iImage=Error" frame.Attributes.Item("src") = url '<----- Shows happily because process ends GoTo Finish End If url = "wfResult.aspx?iMessage=Busy processing&iImage=Busy" frame.Attributes.Item("src") = url '<----- Does not show 'Delete temp upload table if it exists Try SQLStr = "drop table " & Env & "F550001_Budgets" ExecSql.ExecAction(SQLStr, CallData.ReturnId.Void) Catch End Try ... --------------------------------------------------------------------------------- ... + import process... + Table cleanup code until done Please tell me if there is a way to force the result page to show asyncronously with the process ?, or if there is a way to halt the process and allow the load of the result page to show or a way like VB's DoEvents to first update the interface. Thanks Graham
-
I have a .aspx page that does an import and housekeeping when the linkbutton is clicked. This can take up to a minute to complete if successful. For days I have struggled to find the way in which I will let the user know what the status of the import is. Eventually I have managed to load a result page into either an iFrame, or another frame in a frameset. I expected that when that page loads, while the calling page's process is still running, it would load on a different thread and display the status at that time. But, it does not matter what I do, I cannot get the result page to display until the process has not completed in the calling page. When the process is completed, it states that the process has failed or was successful as I want it to work. Yet, when I need to tell the user that the process is busy, it is simply not displayed until the process is done. Here is a piece of code from my .aspx page. My problem lies on the line with comment "'<----- Does not show" --------------------------------------------------------------------------------------- Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click Dim url As String Dim FName As String Dim Env As String Dim FYear As Integer FName = txtFile1.PostedFile.FileName Env = cmbEnv.SelectedItem.Value FYear = cmbStartDate.SelectedItem.Text If FName = "" Or Right$(FName, 4) <> ".csv" Then url = "wfResult.aspx?iMessage=Please select a vald file&iImage=Error" frame.Attributes.Item("src") = url '<----- Shows happily because process ends GoTo Finish End If url = "wfResult.aspx?iMessage=Busy processing&iImage=Busy" frame.Attributes.Item("src") = url '<----- Does not show 'Delete temp upload table if it exists Try SQLStr = "drop table " & Env & "F550001_Budgets" ExecSql.ExecAction(SQLStr, CallData.ReturnId.Void) Catch End Try ... --------------------------------------------------------------------------------- ... + import process... + Table cleanup code until done Please tell me if there is a way to force the result page to show asyncronously with the process ?, or if there is a way to halt the process and allow the load of the result page to show or a way like VB's DoEvents to first update the interface. Thanks Graham
-
First of all estimate the time of housekeeping. Then use javascript to create some sort of visual indication which can then be used to show a rough time
Thanks for that, but it is not the contenet of message itself that is the problem. I am using java to call the page that will display the message (whatever that is). It is this part where I call the page that has a problem. The page does not show until the process is complete.