I am working on an application which involves payment gateways. Payment gateway takes some 4-5 seconds to respond. To tune the application I thought of using PageAsyncTask whenever Payments are processed.
My application uses multiple layers, for e.g before hitting to payment gateway, all sorts of calculations(taxes and all) are calculated in bussiness layer and then the payment gateway processing is done in the data access layer. Method which performs the Payments also returns some custom message to top layers based on the response value. This is done by setting a property in the DAL class.
Now issue is how to register BeginEventHandler and EndEventHandler. I tried creating a sample application for this. But when I debugged my EndEventHandler was not getting called at all.
On a button click event I am trying to call a DAL method which will create a HttpWebRequest and will return the response to me in a string variable
My Page Class has Events below:
protected void btnSubmit_Click(object sender, EventArgs e)
PageAsyncTask task = new PageAsyncTask(new BeginEventHandler(BeginAsyncOperation), new EndEventHandler(EndAsyncOperation),new EndEventHandler(TimeoutAsyncOperation), "" );
View Complete Post