摘要: 【301重定向】1 static void Redirect301(string url)2 {3 HttpContext.Current.Response.StatusCode = 301;4 HttpContext.Current.Response.RedirectLocation = url;5 HttpContext.Current.Response.End();6 }【串行参数】1 static string GetQueryString(NameValueCollection list)2 {3 StringBuilder sb... 阅读全文
posted @ 2012-12-02 17:23 极简 阅读(200) 评论(0) 推荐(0)
摘要: 【散列类型】 不可逆,严格说不算加密算法,是一种保证数据完整性的算法或数字签名.MD5 1 public static string EnMd5(string str) 2 { 3 string pwd = ""; 4 MD5 md5 = MD5.Create(); 5 //注意编码UTF8/Unicode 6 byte[] s = md5.ComputeHash(Encoding.UTF8.GetBytes(str)); 7 for (int i = 0; i < s.Length; i++) 8 { 9 pwd = ... 阅读全文
posted @ 2012-12-02 17:19 极简 阅读(928) 评论(0) 推荐(0)