Paypal Form Ruins My ASP.NET webforms layout -> How to Solve?

后端 未结 2 1962
慢半拍i
慢半拍i 2021-01-01 03:25

I am a student who is doing up a simple website in asp.net. My problem is, I wish to integrate Paypal on one of the pages, but asp.net has the ridiculous

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-01 03:48

    Contrary to popular belief, you can have more than one form on ASP.Net webforms pages. What you cannot do is have more than one form with runat="server", nest a second form inside ASP.Net's main form, or use asp.net server controls outside the main form.

    Therefore, to integrate a separate paypal form with the rest of an asp.net webforms page, you have to make sure that you can put it either before or after all of the asp.net web controls on the page, and then edit the aspx markup to make sure your paypal form is completely outside of asp.net's form.

    The other thing is that a quick web search shows a multitude of paypal controls written for asp.net that will work with the required asp.net form to submit the payment. You could always try one of those.

提交回复
热议问题