We help IT Professionals succeed at work.

Processing a payment

Experts,

Have a webpage that makes a web service call and is waiting for a response to the ws call.  When I get the response it populates 3 textboxes with different information, a  Response Code, a Transaction ID and a Confirmation #.  

My problem is that the web service can take anywhere from an instant to several seconds.  I determine where I go from the information that I receive in the Response Code. (if it is good I go to one page, if it is bad I tell them to recheck their data and resubmit.)

How do I place some bit of information that the process may take a few seconds and please do not close the application window during this time.  Then when the Response Code textbox is filled with info to take the message down and process the information.

I tried the TextChanged event on the textbox and that does not seem to work.

I am using Visual Studio 2010 with Visual Basic.

Any Ideas?
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015
Commented:
Javascript against the click event of the button, perhaps?

The problem with your TextChanged attempt is that it is a server-side event. You code will not provide anything meaningful to the user until the roundtrip to the server completes. What you want is a client-side notification--a la JS.
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:

Author

Commented:
kaufmed,  I see what you are saying about the client-side notification, but bas really wanting to stay away from JS but may have to go there...

CodeCruiser, Yes I am using AJAX.  The link that you show, I tried the Live Demo and tried to download the code but it is not there.  Is there a progress control in AJAX? If so I haven't seen it.
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015

Commented:
...really wanting to stay away from JS...
...Yes I am using AJAX.
Heheh...  but your already there!!!

Author

Commented:
Kaufmed, as soon as I sent that one off I thought to myself, O s###t, that was dumb!
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015

Commented:
No worries. I understand about not wanting to use JS. My job demands that if you provide a JS-enabled site, you must provide a non-JS enabled version. I find it easier to just do the non-JS from the get go  = )

Author

Commented:
kaufmed,  Cool.... ;0)

Author

Commented:
OK kaufmed, where do I go for doing JS in the code?

Author

Commented:
Thanks for the thoughts.  Found solution through both and JS was in there.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.