易截截图软件、单文件、免安装、纯绿色、仅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中接收sql server中存储过程的返回值

存储过程代码:
create procedure proc_name
   @para1 nchar(20),    --输入参数
   @para2 int = null output --输出参数,供程序使用
as
begin
   if (@para1='a')
   begin
       insert into employee(name) value ......

ASP.NET常见安全问题

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

ASP.net

C#:成员变量首字母大写而且前面加下划线
   1.连接对象静态与非静态问题
   2.数据访问类为什么不能派生与DBConnection
   3.Catch的作用,以及为什么可以在这里省掉
   4.在数据访问方法中,为什么不直接实例化     List<NationData> list;
  ......

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自动生成静态HTML网页, 再按日期存放目录

一说到新闻系统的话,一定会谈到静态页面生成的,因为静态页面不但是读取速度快,而且又安全;
静态页面的生成不管是小到现在的企业网站大至网易,QQ等门户都用到了;
那么我们如何来生成静态页呢?
以什么方式生成静态页面呢……
在生成静态页面的时候有那些是要注意的呢:
静态页面命名
统一存放目录 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号