截取字付串
摘要:public static string GetString(string str, int length ) { int i = 0, j = 0; foreach (char chr in str) { if ((int)chr >30) { ...
阅读全文
posted @
2007-12-25 08:42
风语战士
阅读(243)
推荐(0)
表达是做为参数验证用
摘要:public static bool IsValidUsername(string strName, string acsii) { return (Regex.IsMatch(strName, acsii)); }
阅读全文
posted @
2007-12-25 08:39
风语战士
阅读(157)
推荐(0)
DataList翻页
摘要:int CurrentPage;//当前页数 int PageSize; //每页条数 int PageCount; //总页数 int RecordCount;//总条数 private void Page_Load(object sender, System.EventArgs e) { PageSize=16; //每页为16条记录 if(!...
阅读全文
posted @
2007-12-20 23:37
风语战士
阅读(636)
推荐(0)
.net安全防止写不规范字付
摘要:输入时 public string TransString(string str) { short temp=13; str=str.Replace("'","’"); str=str.Replace("&","&"); str=str.Replace("",">"); str=str.Replace(" "," "); str=str.Rep...
阅读全文
posted @
2007-12-20 20:34
风语战士
阅读(213)
推荐(0)
删除成功后.添加前.可判断
摘要:DataGrid1_DeleteCommand 写在这里 if(this.DataGrid1.PageCount==1) { DataGrid1.CurrentPageIndex=0; } else if(this.DataGrid1.Items.Count%25==1) { DataGrid1.CurrentPageIndex--; }...
阅读全文
posted @
2007-12-19 11:10
风语战士
阅读(171)
推荐(0)