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

ASP.NET防止SQL注入函数

ASP.NET防止SQL注入函数:
using System;
using System.Text.RegularExpressions;
using System.Web;
namespace FSqlKeyWord
......{
    /**//**//**//// <summary>
    /// SqlKey 的摘要说明。
    /// </summary>
    public class SqlKey
    ......{
        private HttpRequest request;
        private const string StrKeyWord = @"select|insert|delete|from|count(|drop table|update|truncate|asc(|mid(|char(|xp_cmdshell|exec master|netlocalgroup administrators|:|net user|""|or|and";
        private const string StrRegex = @"[-|;|,|/|(|)|[|]|}|{|%|@|*|!|']";
        public SqlKey(System.Web.HttpRequest _request)
        ......{
            //
            // TODO: 在此处添加构造函数逻辑
            //
            this.request = _request;
        }
        /**//**//**//// <summary>
        /// 只读属性 SQL关键字
        /// </summary>
        public static string KeyWord
        ......{
            get
            ......{
                return StrKeyWord;
            }
        }
  &nbs


相关文档:

sql查重复记录

用select语句,查询重复记录
假设,表名为 T1 子段为 A,B,C
select count(*) ,A,B,C from T1
   group by A,B,C having count(*) > 1
测试数据:
    A100          B100          C100&nbs ......

SQL 语句优化

提高数据库性能的方式有两种
一、一种是DBA通过对数据库的各个方面调优
   调整数据库:共享池,java池,高速缓存,大型池,java池
   针对于window操作系统 32位,oracle内存占用,最大为1.7G,超过则不作用,因此这几项值之和不应超过1.7G
   目前各池参数为:
      ......

ASP.NET MVC介绍

The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating MVC-based Web applications. The ASP.NET MVC framework is ......

ASP.NET中常用的三十三种代码


 1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.为按钮添加对话框
Button1.Attribute ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号