SpiceLogic Inc.
                                                                                                     SpiceLogic Inc. Home PageProductsJournalMy AccountHelp DeskContact Us
 
Knowledge base  : ASP.NET PayPal Control for Website Payments Standard    - Standard Edition
Welcome Guest   Login

Skip Navigation Links. ASP.NET PayPal Control for Website Payments Standard

Documentation  Documentation

Download   Download the latest version

Back to the home of knowledgebase forum Page style gets changed when the BuyNow button is clicked.

An user   6/8/2010 1:34:34 PM

I have an issue while using the paynow button.

When the user click the button a page is sent to the customer browser, before actually reaching Paypal Website. Then the Paypal page appears correctly.

That "temporary" page looks a bit like the page that was containing the paynow button but is modified and the resulting page is not very nice...

Is there a way to stop that temporary page?

I included a screenshot of these pages (before and after the paynow button is clicked) in a PDF...



Resolution:
- [SpiceLogic Support Technician]   6/15/2010 9:42:27 AM

Cause of this problem:
================
If you handle 'Click' event for the buy now button, then, once the button is clicked, the page posts back and when the posted-back page starts loading, the css file downloading gets stopped by immideate http transfer to PayPal website. And as the CSS file for the page does not get chance to be downloaded fully, the page appears like that. We do not have any better idea at this moment to get rid of this problem. Even when we used to follow the PayPal's BuyNow button implementation code manually, we found the same problem.
 
The possible work around:
-=====================
The workaround could be getting rid of Click Event. That means, if you can prepopulate the properties of the BuyNow button before letting your customer clicks the BuyNow button, the problem wont show up. So, you may need another control to populate the BuyNow button's property. I guess, you populate the BuyNow button;s property like, Amount, Quantity, Item Number etc in the Click event handler of the control, right ? So now, you can do the following:
 
Set Visible = false for BuyNow button and place another button control in your page with the text 'Confirm'. So, once the user clicks the 'Confirm' button, you show the Amount, Quantity, ItemNumber etc to the user in the page and then set Visible =true for the BuyNow button and set Visible = false for the Confirm button. Also at the same time, set the ItemNumber, Quantity, Amount etc to the BuyNow button from the Confirm button's click handler. Then, when the user clicks the BuyNow button, as there will be no Click event handler attached to the BuyNow button, there will be no more PostBack and so the page will not be messed up and your customer will be taken to PayPal website.
 
I hope this solution will help.
 



Home  || Products  || Journal  || My Account  || HelpDesk  || Contact Us

Website and Software Copyright ©2010, SpiceLogic Inc., All Rights Reserved.