12 2011 档案

摘要:1 <TABLE id=gridmain 2 style="BORDER-RIGHT: #0066cc 1px solid; BORDER-TOP: #0066cc 1px solid; BORDER-LEFT: #0066cc 1px solid; WIDTH: 100%; BORDER-BOTTOM: #0066cc 1px solid; BORDER-COLLAPSE: collapse; HEIGHT: 104px" 3 ... 阅读全文
posted @ 2011-12-30 15:11 zhjw0996 阅读(375) 评论(0) 推荐(0)
摘要:目前网上流行的所谓“取真实IP地址”的方法,都有bug,没有考虑到多层透明代理的情况。多数代码类似:string IpAddress = (HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]!=null && HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] !=String.Empty) ?HttpContext.Current.Request.ServerVariab 阅读全文
posted @ 2011-12-30 14:55 zhjw0996 阅读(169) 评论(0) 推荐(0)
摘要:也是从博客园copy的,觉得这个有用,略作了优化: 1 public string StringTruncate(string str, string start, string last, int n) 2 { 3 if (str.ToLower().IndexOf(start.ToLower()) >= 0) 4 { 5 if (str.ToLower().IndexOf(last.ToLower()) >= 0) 6 { 7 switch (n) 8 ... 阅读全文
posted @ 2011-12-30 14:31 zhjw0996 阅读(323) 评论(0) 推荐(0)