Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User message
Message
From
17/06/2004 12:26:18
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
User message
Miscellaneous
Thread ID:
00914656
Message ID:
00914656
Views:
44
I need to make a label visible on a click event. The trouble is that event is the last event before a redirect. I have to validate input against a web service and that takes 3-10 seconds at times. I have done all the tricks I know. Any help would facilitate a code free weekend. :)
    Private Sub ValidateAccountAndRedirect()
        Dim bolGoodAccount As Boolean

        Try
            lblValBank.Visible = True                   ' Show the wait for validation message 
            'Application.DoEvents()                     ' <- Too bad this is a fantasy 

            bolGoodAccount = ValidAccount(True)         ' Validate the account against our web service
            If bolGoodAccount Then                      ' Its good
                lblValBank.Visible = False              ' Hide the wait message
                ignoremsg.Visible = False               ' Hide the ignore msg 
                lblBankingMsg.Visible = False           ' Hide the detail message

                If SaveBankInfo() Then                  ' If we can Save the record
                    Response.Redirect("Financial.aspx") ' Go to the next page 
                End If

            Else                                        ' Bank validation falied show msg 
                lblValBank.Visible = False              ' Hide the wait message 
                ignoremsg.Visible = True                ' Make the ignore message available  
                lblBankingMsg.Visible = True            ' Show the detail message 
                cmdIgnoreBankError.Visible = True       ' Allow the ignore command
            End If
        Catch exThread As System.Threading.ThreadAbortException
            ' this error is always expected on respose.redirect
        Catch ex As Exception                           ' customer error trapping 
            Dim err As New MailError
            err.eMailError(ex, "ValidateAccountAndRedirect() " & Me.Page.ToString, context)
        End Try
    End Sub
My humble thanks in advance,
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Next
Reply
Map
View

Click here to load this message in the networking platform