问题描述
我是一名学生,正在asp.net 中创建一个简单的网站.我的问题是,我希望在其中一个页面上集成 Paypal,但是 asp.net 有 可笑 正在进入我的方式.我正在使用蓝图 css 构建一个简单的站点布局,这是一个非常基本的三列布局.但是,我需要我的主要内容部分才能使用 paypal 表单(立即购买按钮),并且站点的其他区域需要使用用户控件,我认为这需要将它们包装在令人讨厌的表单标签中.事实上,我希望在站点主要部分的顶部有一个站点地图路径控件:一些非常基本的东西.我怎样才能做到这一点?我的问题是:我无法在表单中放置 Paypal 按钮,而且我不知道如何将第 4 个 div 移动到位.我什至不确定 div 和表单是如何相互叠加的.
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 <form runat="server">
that is getting in my way. I am building a simple site layout using blueprint css, a very basic three-column layout. However, I need my main content section to be able to use the paypal form (buy now button), and the other areas of the site to use user controls, which I presume requires them to be wrapped in that irritating form tag. In fact, I would like to have a sitemap path control at the top of the main section of the site: something very basic. How might I achieve that? My problem is: I can't put the Paypal button in the form, and I don't know how to shift a 4th div into place. I am not even sure how divs and forms stack on each other.
请问有什么可以帮忙的吗?
Could I have some help please?
有问题的页面是:http://clubofpep.org/sandbox/sandbox_Alumni.aspx一>.
推荐答案
与普遍看法相反,您可以在 ASP.Net 网络表单页面上拥有多个表单.您不能做的是拥有多个带有 runat="server" 的表单,在 ASP.Net 的主表单中嵌套第二个表单,或者在主表单之外使用 asp.net 服务器控件.
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.
因此,要将单独的 paypal 表单与 asp.net webforms 页面的其余部分集成,您必须确保可以将它放在 all 的 asp.net web 之前或之后页面上的控件,然后编辑 aspx 标记以确保您的 paypal 表单完全在 asp.net 的表单之外.
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.
另一件事是,快速的网络搜索显示了为 asp.net 编写的大量贝宝控件,这些控件将与所需的 asp.net 表单一起提交付款.您可以随时尝试其中之一.
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.
这篇关于Paypal 表单破坏了我的 ASP.NET 网络表单布局 ->怎么解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!