摘要:
public static string fromNowToTheDate(DateTime theDate) { string FromNowToTheDate = ""; DateTime d1 = DateTime.Now; DateTime d2 = theDate; TimeSpan d3 = d2.Subtract(d1); FromNowToTheDate = d3.Days.ToString() + "天" + d3.Hours.ToString() + "小时" + d3.Minutes.ToString() + & 阅读全文
摘要:
public static string GetClientIP() { string result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (null == result || result == String.Empty) { result = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; } if (null == result || result == String. 阅读全文