Hi all.
I seem to have some sort of a bottleneck problem with a webpage that contains the following sub:
There's a fair bit of data sent to the next (target) page at Line 43, and the target page can take a while to process everything.
There's no visible content on the target page, it's all processing in a .aspx.vb file.
The problem...
is that the current page (the one with the above Sub on it) stays visible the whole time while the processing is done by the target page, and the next page only displays after the processing is all completed.
I wasn't expecting that, but I can live with it, *IF* I could hide the button and present the "please wait" message.
But as things stand at the moment, once the button is clicked control is handed to the .aspx.vb target file and nothing else happens until processing is complete.
I don't understand why the preceding actions, lines 34 and 40, aren't allowed to complete before the redirection takes control.
I seem to have some sort of a bottleneck problem with a webpage that contains the following sub:
VB.NET:
31 Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
32
33 ' Hide the button from further clicking.
34 Button1.Visible = False
35
36 ' Create the target URL complete with QueryString.
37 Dim target As String = "next-page.aspx?" & qstring.ToString()
38
39 ' Message to display after button click.
40 lblPleaseWait.Text = "Operation in progress. Please wait until it completes... "
41
42 ' Move on to the next page.
43 Response.Redirect(target)
44
45 End Sub
There's no visible content on the target page, it's all processing in a .aspx.vb file.
The problem...
is that the current page (the one with the above Sub on it) stays visible the whole time while the processing is done by the target page, and the next page only displays after the processing is all completed.
I wasn't expecting that, but I can live with it, *IF* I could hide the button and present the "please wait" message.
But as things stand at the moment, once the button is clicked control is handed to the .aspx.vb target file and nothing else happens until processing is complete.
I don't understand why the preceding actions, lines 34 and 40, aren't allowed to complete before the redirection takes control.