I have command button (server control) in my page. When this button is clicked, application will call a stored procedure and generate a pdf report in a new browser. This process of calling the stored procedure and opening a new browser for the report takes about 60 seconds. Therefore, I want to change the mouse pointer to hourglass when the button is clicked. Once the report is created, change the mouse pointer back to default. I am using the following code:
Private Sub cmdRunReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRunReport.Click
Response.Write("<script>document.body.style.cursor = 'wait';</script>")
........
If rptReport.RunReport() Then
Dim myScript = "<script> window.open(""" & rptReport.OutputURL & """) </script>"
Response.Write(myScript)
Else
lblError.Text = lblError.Text & " " & rptReport.ErrDescription
End If
Response.Write("<script>document.body.style.cursor = 'default;</script>")
end sub
This code does change the mouse pointer to hourglass for 1 second and then turns back to default before the report is generated.
Any ideas how to fix it?
Thanks in advance.
Private Sub cmdRunReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRunReport.Click
Response.Write("<script>document.body.style.cursor = 'wait';</script>")
........
If rptReport.RunReport() Then
Dim myScript = "<script> window.open(""" & rptReport.OutputURL & """) </script>"
Response.Write(myScript)
Else
lblError.Text = lblError.Text & " " & rptReport.ErrDescription
End If
Response.Write("<script>document.body.style.cursor = 'default;</script>")
end sub
This code does change the mouse pointer to hourglass for 1 second and then turns back to default before the report is generated.
Any ideas how to fix it?
Thanks in advance.