易截截图软件、单文件、免安装、纯绿色、仅160KB

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"; //命令 +


相关文档:

图片文件上传, 生成高质量缩略图 (asp.net c#)

后台代码:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Dat ......

ASP.NET常见安全问题

ASP.NET常见安全问题
一、SQL语句漏洞
许多程序员在用sql语句进行用户密码验证时是通过一个类似这样的语句来实现的: 
Sql="Select * from 用户表 where 姓名 = '" + name + "' and 密码 = '" + password + "'" 
通过分析可以发现,上述语句存在着致命的漏洞。当我们在用户名称中输入下面的字符串时:tes ......

Asp.NET生成静态页面并分页(文章内容分页)

主要的原理就是替换模板里的特殊字符。
1、静态模板页面 template.html,主要是定义了一些特殊字符,用来被替换。
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">   <html>   <he ......

asp.net文件操作类

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号