CommonLib下的CheckQuery.cs
来源:互联网 发布:潍坊行知学校 编辑:程序博客网 时间:2024/05/05 19:19
using System;
using System.Collections.Generic;
using System.Text;
namespace HG.CommonLib
{
public class CheckQuery
{
/// <summary>
/// 检验网页参数是否存在和是否包含违法字符
/// </summary>
/// <param name="strQuery">参数名称</param>
/// <param name="strUrl">不符合要求后的转向地址</param>
public static void CheckQueryStr(string strQuery, string strUrl)
{
if (System.Web.HttpContext.Current.Request[strQuery] == null)
{
System.Web.HttpContext.Current.Response.Redirect(strUrl);
}
else
{
string strKey = "'";
if (System.Web.HttpContext.Current.Request[strQuery].ToString().IndexOfAny(strKey.ToCharArray()) != -1)
{
System.Web.HttpContext.Current.Response.Redirect(strUrl);
}
}
}
/// <summary>
/// 检测网页post过来的地址!
/// </summary>
/// <param name="FormQuery">要检测的关键字</param>
/// <param name="strUrl">如果不存在要转向的地址</param>
public static void CheckQueryFrom(string FormQuery, string strUrl)
{
if (System.Web.HttpContext.Current.Request.Form[FormQuery] == null)
{
System.Web.HttpContext.Current.Response.Redirect(strUrl);
}
}
}
}
- CommonLib下的CheckQuery.cs
- commonlib.h
- cs模式下的自动更新
- 三层构架下的DBHelper.cs类
- 三层构架下的DBHelper.cs类
- CS模式下的客户端的注册登录查询
- DAL下ProductCategoryDAL.cs
- Common下FileHelper.cs
- Common下ImageHelper.cs
- Common下JsonHelper.cs
- Common下MadieHelper.cs
- Common下MessageBox.cs
- Common下RegHelper.cs
- Common下StringHelper.cs
- DBUtility下AccessHelper.cs
- DBUtility下SQLHelper.cs
- Common下JsonHelper.cs
- Common下StringHelper.cs
- 类似微软Kinect的技术:实时动作捕捉技术(使用计算机视觉技术)寻求合作!(体感游戏技术!可用于游戏机、网络游戏...等)
- 数据库分离
- 生活
- 数据库逻辑名称和数据库物理名称
- ASP.NET文件操作收藏
- CommonLib下的CheckQuery.cs
- 开关功率mos管介绍
- 无盘电影菜单 电子书 手册 源码 CSDN
- 数据库还原
- HTTP服务器开发教程
- MyBookWorld历险记
- 还原数据库出错:”因为数据库正在使用,所以无法获得对数据库的独占访问权“的解决方案
- UltraEdit 15.10注册码
- 假期无事