Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASPX form does not show

Status
Not open for further replies.

wbeetge

Programmer
May 2, 2002
57
ZA
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
 
If I understand your problem correctly, why not use javascript to display a message to your user? You could use something like my submit button:


When this is clicked, the buttons' text is changed to a specified value (maybe something like "Processing...?") and is disabled on the client side while server side processing is being done.

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Hi AtomicChip

I will certainly try it and let you know.
I gave a na anomated clock gif that I display with the message when it is processing, and a success and failure gif based on the result that is displayed next to the message. I might still have to see how to display the clock with your button.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top