Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Asp.netµ÷ÓÃRARѹËõÎļþÓë½âѹÎļþÔ´Âë

//ѹËõ
protected void btnY_Click(object sender, EventArgs e)
{
 string rar;
 RegistryKey reg;
 string args;
 ProcessStartInfo procStart;
 Process process;
 try
 {
  reg = Registry.ClassesRoot.OpenSubKey(@"Applications\WinRAR.exe\Shell\Open\Command");
  rar = reg.GetValue("").ToString();//»ñȡע²á±írar°²×°Â·¾¶
  reg.Close();
  rar = rar.Substring(1, rar.Length - 7);//»ñÈ¡rar°²×°Â·¾¶
  args = "a -inul -y G:\\temp.rar G:\\1.txt";//ÕâÀïΪrarµÄѹËõÃüÁî¸ñʽ£¨Ò²¿ÉÒÔ×ÔÐÐÀ©Õ¹£©
  procStart = new ProcessStartInfo();
  procStart.FileName = rar;
  procStart.Arguments = args;//²ÎÊý
  procStart.WindowStyle = ProcessWindowStyle.Hidden;//´°¿Ú״̬
  procStart.WorkingDirectory = Server.MapPath(""); ;//»ñÈ¡»òÉèÖÃÒªÆô¶¯µÄ½ø³ÌµÄ³õʼĿ¼¡£
  process = new Process();
  process.StartInfo = procStart;
  process.Start();
  Response.Write("<script>alert('ѹËõ³É¹¦')</script>");
 }
 catch (Exception ex)
 {
  Response.Write(ex.ToString());
 }
}
//½âѹ
protected void btnJ_Click(object sender, EventArgs e)
{
 string rar;
 RegistryKey reg;
 string args;
 ProcessStartInfo startInfo;
 Process process;
 try
 {
  reg = Registry.ClassesRoot.OpenSubKey(@"Applications\WinRar.exe\Shell\Open\Command");
  rar = reg.GetValue("").ToString();
  reg.Close();
  rar = rar.Substring(1, rar.Length - 7);
  args = " X E:\\temp.rar E:\\";
  startInfo = new ProcessStartInfo();
  startInfo.FileName = rar;
  startInfo.Arguments = args;
  startInfo.WindowStyle = ProcessWindowStyle.Hidden;
  process = new Process();
  process.StartInfo = startInfo;
  process.Start();
  Response.Write("<script>alert('½âѹ³É¹¦')</script>");
 }
 catch (Exception ex)
 {
  Response.Write(ex.ToString());
 }
}
Àý:°Ñ


Ïà¹ØÎĵµ£º

asp.netģ̬´°¿ÚʹÓÃ

1 ÈçºÎÔÚÌá½»ºó·ÀÖ¹µ¯³öд°¿Ú
2 ÔÚģ̬´°¿ÚÖÐÔٴε¯³öģ̬´°¿Ú
3 ģ̬´°¿Ú·µ»ØÖµ
4 ˢи¸´°¿Ú
5 ¸¸´°¿ÚÈçºÎÌí¼Óˢнű¾
Ö÷´°¿Úµ¯³öÒ»¸öģ̬´°¿Ú,
var firstDiag = window.showModalDialog(url,window,"center:yes;dialogWidth:300px;dialogHeight:400px");
×¢:ÔÚurlÎļþµÄhead¼ÓÈë <base target='_self'> ¾ ......

asp.netÍøÒ³¾²Ì¬»¯

Ò»¡£¢Ù£ºÊ×ÏÈÒªÓÐÕâ¸öÎļþURLRewriter.dll,Èç¹ûûÓÐ,¸Ï¿ìµ½ÍøÉÏÏÂÔØÒ»¸ö,²¢½«Æä·Åµ½ÏÂÃæµÄbinĿ¼ÀïÃæ,²¢ÇÒ½«ÆäÒýÓÃÌí¼Óµ½ÏÂÃæÀïÃæ;
  ¢Ú£ºÏÂÃæ¾ÍÊÇWeb.ConfigÎļþµÄÅäÖÃÁË,µ±È»,ÅäÖùý³ÌÏ൱¼òµ¥£º
  1£ºÏÈÌí¼ÓÕâ¸ö
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.Rew ......

ASP.NET ÅжÏÍøÒ³±àÂë¶ÁÈ¡ÄÚÈÝ£¬·ÀÖ¹ÂÒÂë

×î½üҪдһ¸öÔÚÍøÒ³ÖвéÕҹؼü×Ö¼°Á´½ÓµÄ³ÌÐò£¬ÔÚÊä³öµ½TextBoxµÄʱºò·¢ÏÖ¾­³£³öÏÖÂÒÂ룬ÕûÀíÁËһϸù¾Ý²»Í¬µÄ±àÂëÑ¡È¡ÍøÒ³Ô´Îļþ£¬Ä¿Ç°¿ÉÒÔ½â¾ö¼¸ÖÖ³£±àÂ뷽ʽµÄÍøÒ³£¬¸ÐÐËȤµÄ¿ÉÒÔÊÔÏ¡£
±¾À´ÏëÓÓ£½£½”ÅжϱàÂ룬¸Ð¾õ±È½ÏÂé·³£¬ËùÒÔ¸ÄÓñȽÏÄ£ºýµÄ·½·¨£¬ContainsÓÃÔÚÕâÀïͦ·½±ãµÄ¡£
Contains˵Ã÷£º¾ÍÊÇ·µ» ......

²Ù×÷XML£¬¶ÔXMLµÄÔöɾ¸Ä²é²Ù×÷¡£asp.net C#

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace jiu ......

asp.net ´Ó×ÊÔ´ÎļþÖлñÈ¡×ÊÔ´ÄÚÈÝ¡¢»ñÈ¡×ÊÔ´Áбí

ΪÁËÄÜÈÃÀ´×Ô²»Í¬ÎÄ»¯Ï°¹ß»òʹÓò»Í¬ÓïÑÔ×÷ΪĸÓïµÄ·Ã¿ÍÄܹ»ÔĶÁÎÒÃǵÄÍøÕ¾£¬Ôò±ØÐëΪÕâЩ¶ÁÕßÌṩÓÃËûÃÇ×Ô¼ºµÄÓïÑԲ鿴ÍøÒ³µÄ·½·¨¡£Ò»ÖÖ·½·¨ÊÇ·Ö±ðÓø÷ÓïÑÔÖØд´½¨Ò³Ã棬µ«ÕâÖÖ·½·¨¿ÉÄÜÐèÒª´óÁ¿¹¤×÷Á¿¡¢ÈÝÒ׳ö´í²¢ÇÒÔÚ¸ü¸ÄԭʼҳʱºÜÄÑά»¤¡£ÀûÓà ASP.NET£¬¿ÉÒÔʹ´´½¨µÄÒ³Ãæ»ùÓÚä¯ÀÀÆ÷µÄÊ×Ñ¡ÓïÑÔÉèÖûòÓû§ÏÔʽѡÔñµÄÓïÑÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ