用ASP.NET怎样实现文件打包下载? 在网站上提供一些文件下载,让访问者选择要下载的文件后,再打包成一个文件一次下载。怎么用ASP.NET实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用ASP.net实现RAR动态压缩文件看行不? 你是说用RAR命令行调用?但人家的服务器给你运行Dos命令吗?我看不行吧! 给你个网址你自己看看吧!http://www.hackhome.com/InfoView/Article_157425.html C#后端服务器实现 谢谢,我试试,不过还是调用Dos命令执行的: the_StartInfo = new ProcessStartInfo(); the_StartInfo.FileName = the_rar; the_StartInfo.Arguments = the_Info; the_StartInfo.WindowStyle = ProcessWindowStyle.Hidden; the_Process = new Process(); the_Process.StartInfo = the_StartInfo; the_Process.Start(); 只是窗口隐藏了。 private void RAR(){ // 把WinRAR目录复制到网站目录下。对WinRAR目录要有运行权限。 string pathRoot = Server.MapPath("/"); string winRAR = pathRoot + "WinRAR/WinRAR.exe"; // 把Job.aspx和Default.aspx这两个文件添加到压缩包Job.rar中 string arguments = @"a Job.rar Job.aspx Default.aspx"; try { ProcessStartInfo info = new ProcessStartInfo(); info.FileName = winRAR; // WinRaR.exe目录 info.Arguments = arguments; // 参数 info.WorkingDirectory = pathRoot; Process p = new Process(); p.StartInfo = info; p.Start();//启动 Response.Write("压缩成功。"); } catch (Exception ex) { Response.Write(ex.Message); }} private void RAR(){ // 把WinRAR目录复制到网站目录下。对WinRAR目录要有运行权限。 string pathRoot = Server.MapPath("/"); string winRAR = pathRoot + "WinRAR/WinRAR.exe"; // 把Job.aspx和Default.aspx这两个文件添加到压缩包Job.rar中 string arguments = @"a Job.rar Job.aspx Default.aspx"; try { ProcessStartInfo info = new ProcessStartInfo(); info.FileName = winRAR; // WinRaR.exe目录 info.Arguments = arguments; // 参数 info.WorkingDirectory = pathRoot; Process p = new Process(); p.StartInfo = info; p.Start();//启动 Response.Write("压缩成功。"); } catch (Exception ex) { Response.Write(ex.Message); }}这个好像还可以,我试过了。 这种情况,学ASP.NET还需多久 C# C/S程序密码强度判断 怎么弄? 进程为什么会超过最大进程数?? 同一个程序运行不同的表时,update出错 DataGrid绑定更新后数据时跳过更新行的问题,请指教 关于没有virtual和override的同名函数的继承?? 一个简单的程序,需要大家的指点,谢谢~~ C#的前途如何? 高分求json数据快速写入数据库的方法。 使用CrystalReport产生报表,如何一次将这6页连续打印出来(在IE中) “Sources”参数不支持重复项 c#如何在网页中实现视频聊天
the_StartInfo = new ProcessStartInfo();
the_StartInfo.FileName = the_rar;
the_StartInfo.Arguments = the_Info;
the_StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
the_Process = new Process();
the_Process.StartInfo = the_StartInfo;
the_Process.Start();
只是窗口隐藏了。
private void RAR()
{
// 把WinRAR目录复制到网站目录下。对WinRAR目录要有运行权限。
string pathRoot = Server.MapPath("/");
string winRAR = pathRoot + "WinRAR/WinRAR.exe"; // 把Job.aspx和Default.aspx这两个文件添加到压缩包Job.rar中
string arguments = @"a Job.rar Job.aspx Default.aspx";
try
{
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = winRAR; // WinRaR.exe目录
info.Arguments = arguments; // 参数
info.WorkingDirectory = pathRoot; Process p = new Process();
p.StartInfo = info;
p.Start();//启动 Response.Write("压缩成功。");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
{
// 把WinRAR目录复制到网站目录下。对WinRAR目录要有运行权限。
string pathRoot = Server.MapPath("/");
string winRAR = pathRoot + "WinRAR/WinRAR.exe"; // 把Job.aspx和Default.aspx这两个文件添加到压缩包Job.rar中
string arguments = @"a Job.rar Job.aspx Default.aspx";
try
{
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = winRAR; // WinRaR.exe目录
info.Arguments = arguments; // 参数
info.WorkingDirectory = pathRoot; Process p = new Process();
p.StartInfo = info;
p.Start();//启动 Response.Write("压缩成功。");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}这个好像还可以,我试过了。