【问题标题】:Paypal sandbox url opens my documentsPaypal 沙箱 url 打开我的文档
【发布时间】:2017-07-25 11:59:15
【问题描述】:

当我单击应该重定向到贝宝的按钮时,我遇到了一个问题,它会打开我的文档。它之前正在运行,但是当我将代码传输到另一台 PC 时,出现了错误。救命!

这是aspx.cs中的代码

protected void btnPayOnline_Click(object sender, 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);

}

这是aspx代码:

我真的不明白问题是什么

【问题讨论】:

  • aspx 代码抱歉

标签: c# asp.net paypal-sandbox


【解决方案1】:

您的程序会启动文件夹资源管理器(从而显示您的默认本地目录),而不是您的网络浏览器。

explorer.exe 替换为iexplore.exe 应该可以解决您的问题。

【讨论】:

  • Process.Start("http://google.com") 是更好的选择,因为它将打开默认浏览器而不是 Internet Explorer。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2010-12-19
  • 2021-12-05
  • 2012-11-09
  • 1970-01-01
  • 2018-05-28
  • 2013-05-06
相关资源
最近更新 更多