asp.net的网站部署到iis后button失效,请问如何解决?
使用了一个服务器控件button想要通过客户端点击按钮来打开服务器上的一个.bat文件(在服务器上运行),本地测试时没有问题,但是部署到iis后点击按钮没有任何反应,按钮是绑定了事件的,请问该如何解决呢?
代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Diagnostics;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Process p = new Process();
p.StartInfo.FileName = @"H:\Xilinx\14.7\ISE_DS\test.bat";//exe的路径
p.Start();
}
protected void Button2_Click(object sender, EventArgs e)
{
Process p = new Process();
p.StartInfo.FileName = @"H:\Xilinx\14.7\ISE_DS\test.bat";//exe的路径
p.Start();
}
}
Anthonyccc
2019/03/10 10:17- c#
- asp.net
- 点赞
- 收藏
- 回答
1个回复
