我想在我的.aspx頁面中實現一個貝寶付款。我在我的頁面中有以下html:在ASP.NET頁面中的POST表格
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="hosted_button_id" value="19218">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="business" value="<%= ConfigurationManager.AppSettings("BusinessEmail").ToString%>">
<input type="hidden" name="item_name" value="<%= "CityBits Gold " & listplans.SelectedItem.ToString & " listing plan for " & trim(txttitle.text)%>">
<input type="hidden" name="item_number" value="<%= HiddenFieldid.Value%>">
<input type="hidden" name="amount" value="<%= listplans.SelectedValue%>">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="return" value="<%= ConfigurationManager.AppSettings("ReturnUrl").ToString & "?requestID=" & HiddenFieldid.Value%>">
<input type="hidden" name="cancel_return" value="<%= ConfigurationManager.AppSettings("CancelUrl").ToString%>">
<input type="hidden" name="no_shipping" value="1">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
在我的aspx頁面中,當我點擊貝寶按鈕時,它只是刷新頁面。當我將完全相同的代碼(當然是實際值)放在一個純HTML文件中並單擊該按鈕時,它會根據需要將我重定向到PayPal。我已經嘗試使用輸入的實際值,就像在html頁面中一樣,但它仍然不起作用。
如果它很重要,我有更新我的網頁面板,但這種形式不在裏面。
有人知道我在做什麼錯嗎?這可能是愚蠢的,但現在讓我頭疼2天!
快速破解:在開始處放置一個關閉窗體 - >'
@Aristos其實我在這個頁面上使用了一個masterpage,所以我不能在這樣的開始關閉表單。之後我還有其他的asp.net元素。 – user2916280