简体   繁体   English

贝宝沙盒URL打开我的文档

[英]Paypal sandbox url opens my documents

I've been encountering a problem when I click on the button that should redirect to paypal it opens my documents. 当我单击应该重定向到贝宝的按钮时,我一直遇到问题,它打开了我的文档。 It was running before but when I transferred the codes to another PC the error occurs. 它在运行之前,但是当我将代码传输到另一台PC时,发生了错误。 Help! 救命!

Here is the code in aspx.cs 这是aspx.cs中的代码

protected void btnPayOnline_Click(object sender, EventArgs e) { 受保护的无效btnPayOnline_Click(对象发送者,EventArgs e){

        string url = "";

        string business = "business@yahoo.com";
        string description = "Buy";
        string country = "PH";
        string currency = "PHP";
        string amount = Label1.Text;

        url += "https://www.sandbox.paypal.com/cgi-bin/webscr" +
            "?cmd=" + "_xclick" +
            "&business=" + business +
            "&amount=" + amount +
            "&lc=" + country +
            "&item_name=" + description +
            "&currency_code=" + currency +
            "&bn=" + "PP%2dBuyNowBF";

        System.Diagnostics.Process.Start("explorer.exe", url);

} }

Here is the aspx codes: 这是aspx代码:

I really dont see what the problem is 我真的看不出问题是什么

Your program starts the folder explorer (thus showing your default local directory), not your web browser. 您的程序将启动文件夹资源管理器(从而显示默认的本地目录),而不是Web浏览器。

Replacing explorer.exe by iexplore.exe should solve your issue. iexplore.exe替换explorer.exe应该可以解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM