ASP.NET 页面数据校验类 李天平老师写的,很好的
using System.Text.RegularExpressions;
/// <summary>
/// 页面数据校验类
/// 李天平
/// 2004.8
/// </summary>
public class PageValidate
{
private static Regex RegNumber = new Regex("^[0-9]+$");
private static Regex RegNumberSign = new Regex("^[+-]?[0-9]+$");
private static Regex RegDecimal = new Regex("^[0-9]+[.]?[0-9]+$");
private static Regex RegDecimalSign = new Regex("^[+-]?[0-9]+[.]?[0-9]+$"); //等价于^[+-]?\d+[.]?\d+$
private static Regex RegEmail = new Regex("^[\\w-]+@[\\w-]+\\.(com|net|org|edu|mil|tv|biz|info)$");//w 英文字母或数字的字符串,和[a-zA-Z0-9] 语法一样
private static Regex RegCHZN = new Regex("[\u4e00-\u9fa5]");
public PageValidate()
{
}
#region 数字字符串检查
/// <summary>
/// 检查Request查询字符串的键值,是否是数字,最大长度限制
/// </summary>
/// <param name='req'>Request</param>
/// <param name='inputKey'>Request的键值</param>
/// <param name='maxLen'>最大长度</param>
/// <returns>返回Request查询字符串</returns>
public static string FetchInp
相关文档:
//连接数据库
string myStr = CODE.DbHelperSQL.connectionString;
SqlConnection myConn = new SqlConnection(myStr);
myConn.Open();
&nbs ......
图片:
http://hi.csdn.net/space-275744-do-album-picid-491613-goto-down.html
数据部分采用了C#+ASP.NET+ORACLE DB
图表部分采用了SQL SERVER 2005 的REPORTING SERVICE 。
将REPORTING SERVICE部署好以后,采用C#的REPORT VIEWER控件,就可以连到我们部署好的REPORT,省去自己动手画图的步骤。 ......
asp.net中使用基于角色role的Forms验证,大致经过几下四步:
1.配置系统web.config
timeout="20" path="/" />
其中 表示本应用程序采用Forms验证方式。
1). 标签中的name表示指定要用于身份验证的 HTTP Cookie。默认情况下,name 的值是 .ASPXAUTH。采用此种方式验证用户后,以此用户的信息建立一个FormsAuthenticati ......
先建个html模版页(template.htm):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>$title</title>
</head>
&l ......
select top 6 * from ViewHouseSale where 1=1 and (EstateType='0' or EstateType='1')
and DateDiff(day,PubDate,getdate()) <=7 and IfBenefit='Y' and IfValid='Y' order by PubDate DESC
select top 6 * from ViewHouseSale where 1=1 and&nb ......