Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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µÄÒ»¸ödbhelperÀà

using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections.Generic;
using System.Text;
namespace Maticsoft.DBUtility
{
     /// <summary>
  ......

ASP.NET ViewState ¼ò½é

  ASP.NET ViewState ÊÇÒ»ÖÖеÄ״̬·þÎñ£¬¿É¹©¿ª·¢ÈËÔ±»ùÓÚÿ¸öÓû§À´¸ú×Ù UI ״̬£¬¸Ã¸¨ÖúÊý¾Ý±»´æ´¢ÔÚÒ»¸öÃûΪ __VIEWSTATE µÄÒþ²Ø×Ö¶ÎÖС£
    µ±È»£¬ ViewState ÔÚ ASP.NET ÖÐÓиöÖØÒªµÄ½ÇÉ«¡£Èç¹ûʹÓÃÇ¡µ±£¬ËüÄܹ»¼ò»¯Ò³Ã濪·¢£¬¸Ä½øÓû§ÓëÕ¾µãµÄ½»»¥¡£Èç¹ûÖÃÖ®²»Àí£¬ËüÄܹ»ÏÔÖøÔö¼ÓÕ¾µãÏìÓ¦´óÐ ......

ASP.NETʵÏÖÔöɾ¸Ä²éµÈ¹¦ÄÜ(Access°æ)ϵͳ֮ËÄ É¾³ý

//¸ù¾ÝÖ÷¼üÀ´É¾³ý±íÖеÄÊý¾Ý¡£
//ɾ³ý
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        OleDbConnection sqlConnection = new OleDbConnection(GetConnection());
 
   & ......

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

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