C# Paypal沙盒url打开我的文档
我一直遇到一个问题,当我点击按钮,应该重定向到贝宝它打开我的文档。它以前运行过,但当我将代码传输到另一台电脑时,出现了错误。救命啊 以下是aspx.cs中的代码 受保护的无效btnPayOnline_单击(对象发送者,事件参数e) {C# Paypal沙盒url打开我的文档,c#,asp.net,paypal-sandbox,C#,Asp.net,Paypal Sandbox,我一直遇到一个问题,当我点击按钮,应该重定向到贝宝它打开我的文档。它以前运行过,但当我将代码传输到另一台电脑时,出现了错误。救命啊 以下是aspx.cs中的代码 受保护的无效btnPayOnline_单击(对象发送者,事件参数e) { string url = ""; string business = "business@yahoo.com"; string description = "Buy"; string country
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 +
"¤cy_code=" + currency +
"&bn=" + "PP%2dBuyNowBF";
System.Diagnostics.Process.Start("explorer.exe", url);
}
以下是aspx代码:
我真的不明白问题出在哪里您的程序启动的是文件夹资源管理器(从而显示默认的本地目录),而不是web浏览器 用
iexplore.exe
替换explorer.exe
应该可以解决您的问题。aspx code对不起进程。开始(“http://google.com“
是更好的选择,因为它将打开默认浏览器而不是Internet Explorer。