asp.netÎļþºÍÎļþ¼ÐѹËõ
·¨Ò»£ºµ÷ÓÃwinrar
using Microsoft.Win32;
using System.Diagnostics;
protected void Button1_Click(object sender, EventArgs e)
{
RAR(@"E:\95413594531\GIS", "tmptest", @"E:\95413594531\");
}
/// <summary>
/// ѹËõÎļþ
/// </summary>
/// <param name="DFilePath">ÐèҪѹËõµÄÎļþ¼Ð»òÕßµ¥¸öÎļþ</param>
/// <param name="DRARName">Éú³ÉѹËõÎļþµÄÎļþÃû</param>
/// <param name="DRARPath">Éú³ÉѹËõÎļþ±£´æ·¾¶</param>
/// <returns></returns>
protected bool RAR(string DFilePath, string DRARName,string DRARPath)
{
String the_rar;
RegistryKey the_Reg;
Object the_Obj;
String the_Info;
ProcessStartInfo the_StartInfo;
Process the_Process;
try
{
the_Reg = Registry.ClassesRoot.OpenSubKey(@"Applications\WinRAR.exe\Shell\Open\Command");
the_Obj = the_Reg.GetValue("");
the_rar = the_Obj.ToString();
the_Reg.Close();
the_rar = the_rar.Substring(1, the_rar.Length - 7);
the_Info = " a " + " " + DRARName + " " + DFilePath +" -ep1"; //ÃüÁî + ѹË
Ïà¹ØÎĵµ£º
Ê×Ò³£º
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head ......
½üÆÚÓöµ½asp.net mvc »·¾³ÅäÖÃÎÊÌ⣬ËäÈ»¶¼°²×°ÉÏÈ¥ÁË£¬µ«ÊÇÔÚ´´½¨ADO.net ʵÌåÊý¾ÝÄ£ÐÍÍê³Éºó£¬»áÆÈʹvs´°¿Ú¹Ø±Õ£¬µ±ÄãÖØдò¿ªºó·¢ÏÖmodelsÎļþÖÐʲôҲûÓУ¬µ«ÊÇÔÚÏîÄ¿ËùÔÚµÄλÖã¬modelsÖÐÓÐÄã¸Õ½¨µÄʵÌåÊý¾ÝÄ£ÐÍ£¬¿ì°ÑÎÒÓôÃÆËÀÁË£¡Õâµ½µ×ÊÇÔõô»ØÊ£¿
ÎÒÓõÄÊÇVS2008 ¼òÌåÖÐÎÄרҵ°æ
AspNetMVC 1.0
vs2008 s ......
ASP.NET Ó¦ÓóÌÐò±ØÐëλÓÚ IIS ÐéÄâĿ¼£¨Ò²³ÆΪӦÓóÌÐò¸ùĿ¼£©ÖС£ASP.NET Ó¦ÓóÌÐò¿É°üº¬ÒѱàÒëµÄ³ÌÐò¼¯£¨Í¨³£ÊÇ°üº¬ÒµÎñÂß¼µÄ DLL Îļþ£©¡¢ÓÃÓÚ´æ´¢Ô¤±àÒë´úÂëµÄÒÑ֪Ŀ¼£¨Ä¿Â¼Ãû×ÜÊÇ \Bin£©¡¢´æ´¢ÔÚ»ùÓÚÎı¾µÄ¡¢Ò׶ÁµÄ Web.config ÎļþÖеÄÅäÖÃÉèÖá¢Ò³¡¢·þÎñÆ÷¿Ø¼þ£¬ÒÔ¼° XML Web ·þÎñ¡£
·þÎñÆ÷ÖÐÈκβ»ÓëÆäËûÓ¦Óà ......