Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6591607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:26:47+00:00 2026-05-25T17:26:47+00:00

I have two weird workflows that I’m able to fix.. I fixed them by

  • 0

I have two weird workflows that I’m able to fix.. I fixed them by accident by simply checking a style in ASP.NET code behind. I want to hear your theories as to why this occurs. I have a couple of my own, but I don’t want to have any stereotypes from you reading this if I tell you my theory.

Setup:

So I have a button (event code below in various snippets) on an ASP.NET page that submits my form. There are two workflows that are causing an issue. In each workflow, a WCF service call is being made. The WCF service call sets the CSS visibility attribute to “visible” when it’s invoked. And the response JavaScript function changes the visibility attribute back to “hidden”.

In each of these two workflows, the button that submits my form is being pressed too quickly, and the WCF call never returns, and the WCF service errors out. The form is submitted, and everything is perfect (since the WCF call never changed anything in the form), it’s just that I get the error. A nicer approach to fixing this is to disable the buttons when the WCF service call is happening, which is exactly why I’m making the AJAX spinner visible and hidden. But right now, I am fixing my issue by checking the style, to understand the black boxes of ASP.NET, the browser and JavaScript, and how they’re interacting when ASP.NET checks a style.

When I run this code, I get the WCF error:

    Private Sub SaveCancelDeleteButtonClick(ByVal sender As Object, ByVal e As SaveCancelDelete.DynamicButtonEventArgs) Handles SaveCancelDelete.CustomButtonClick

        Dim valid As Boolean = ValidatePage()
        Trace.Write(String.Format("Caught a button with event {0}", e.EventName))
... continued

When I run this code I DO NOT get the WCF error:

    Private Sub SaveCancelDeleteButtonClick(ByVal sender As Object, ByVal e As SaveCancelDelete.DynamicButtonEventArgs) Handles SaveCancelDelete.CustomButtonClick

        Dim x As String = ImageAjaxSpinner.Style("visibility")
        Dim valid As Boolean = ValidatePage()
        Trace.Write(String.Format("Caught a button with event {0}", e.EventName))
... continued

When I run this code I DO NOT get the WCF error:

    Private Sub SaveCancelDeleteButtonClick(ByVal sender As Object, ByVal e As SaveCancelDelete.DynamicButtonEventArgs) Handles SaveCancelDelete.CustomButtonClick

        If ImageAjaxSpinner.Style("visibility") = "visible" Then
            Return
        End If
        Dim valid As Boolean = ValidatePage()
        Trace.Write(String.Format("Caught a button with event {0}", e.EventName))
... continued

When I debug, this style is ALWAYS hidden in these two workflows (in the last 2 snippets obviously since I didn’t have the style code in the first snippet). I have a couple theories, but I want to hear your theories as to why this is happening.

==========

Ideally, I should gray out the buttons during the WCF call, but this is merely a theoretical question.

FYI: The JavaScript is changing the visibility, not the ASP.NET code.

AJAX spinner:

<asp:Image ID="ImageAjaxSpinner" runat="server" ImageUrl="~/images/ajax-spinner.gif" style="position:absolute; top:0px; right:0px; visibility:hidden;" AlternateText="spinner" />

Snippet of JavaScript pseudo class WCF web service error function:

PreAccessioningLoadError: function(sender) {

    jQuery(this.Elements.ImageAjaxSpinner).css("visibility", "hidden");
    alert("error");  
    return false;
},

=============

8/24/2011 1:27pm update

When I run this code, I get the WCF error:

        Private Sub SaveCancelDeleteButtonClick(ByVal sender As Object, ByVal e As SaveCancelDelete.DynamicButtonEventArgs) Handles SaveCancelDelete.CustomButtonClick

        If ImageAjaxSpinner.Visible = True Then
            Return
        End If            

        Dim valid As Boolean = ValidatePage()
        Trace.Write(String.Format("Caught a button with event {0}", e.EventName))
... continued

When I run this code, I get the WCF error:

    Private Sub SaveCancelDeleteButtonClick(ByVal sender As Object, ByVal e As SaveCancelDelete.DynamicButtonEventArgs) Handles SaveCancelDelete.CustomButtonClick

        ' D-02568 - fixed
        'If ImageAjaxSpinner.Style("visibility") = "visible" Then
        '    Return
        'End If

        ' D-02568 - fixed
        'Dim x As String = ImageAjaxSpinner.Style("visibility")

        ' D-02568 - not fixed; throws WCF error
        'If ImageAjaxSpinner.Visible = True Then
        '    Return
        'End If

        ' D-02568 - not fixed; throws WCF error
        Dim x As Boolean = ImageAjaxSpinner.Visible

        Dim valid As Boolean = ValidatePage()
        Trace.Write(String.Format("Caught a button with event {0}", e.EventName))
... continued
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:26:48+00:00Added an answer on May 25, 2026 at 5:26 pm

    This seems to be a mysterious thing happening in the black box of Mozilla Firefox, and works. It doesn’t work in all browsers, so I didn’t rely on this code at all! Unless a developer of Mozilla Firefox browser can answer my question, I won’t change my answer here. I am disabling my buttons until the WCF service response comes back, so the end-user can’t click the button until the data is there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently I've faced weird issue. I have two simple queries where one of them
I have two applications written in Java that communicate with each other using XML
I'm stuck with a weird problem. I have two files a.c and b.c as
This has been driving me nuts all day. I have a weird bug that
Here is a weird behavior that I don't understand about custom views. I have
I have a very weird error with c++. I have two values, max and
I witnessed the following weird behavior. I have two functions, which do almost the
I just ran into something weird. I have two JSON arrays which holds different
I have two types of links that are event-bound. If the clicked-on link has
The title is a bit weird, so let me clarify. I have two objects,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.