摘要: 毕竟Substring()还是有所不同的。那就自己写一个吧!在cs文件中:static public string Left(string str, int L) { string tmpStr; tmpStr = str; if (str.Length > L) { tmpStr = str.Substring(0, L) + "..."; } return tmpStr; }在aspx文... 阅读全文
posted @ 2008-05-27 21:38 Silent's Blog 阅读(444) 评论(0) 推荐(0) 编辑
摘要: 1获取真实IP234publicstaticstringGetRealIP()5{6stringip;7try8{9HttpRequestrequest=HttpContext.Current.Request;1011if(request.ServerVariables["HTTP_VIA"]!=null)12{13ip=request.ServerVariables["HTTP_X_FORWAR... 阅读全文
posted @ 2008-04-25 16:50 Silent's Blog 阅读(294) 评论(0) 推荐(0) 编辑