导入命名空间:using System.Web.Security; MD5加密算法: string Password = FormsAuthentication.HashPasswordForStoringInConfigFile(TextBox1.Text.ToString(), "MD5");