日期:2014-05-17 浏览次数:20556 次
private void Button2_Click(object sender, EventArgs e)
{
string text = this.p.Text;
string v = ConfigurationSettings.AppSettings["ConnectionString"];
switch (v)
{
case null:
case string.Empty:
throw new ApplicationException("web.config中应该包含 <appSettings><add key=\"ConnectionString_da\" value=\"数据连接串\" /></appSettings> ");
}
int index = v.IndexOf("password=");
int num2 = v.IndexOf(";", index);
string str3 = v.Substring(index + 9, (num2 - index) - 9);
text = "NMGrskssok3";
v = v.Replace("password=" + str3, "password=" + cStr.Encrypting(text, this.PublicKey));
this.SaveWeb("ConnectionString", v);
this.SaveWeb("ConnectionString_da", v);
base.Response.Write("<script>alert('密码修改成功!')</script>");
}
this.PublicKey = "@(1Qz1)#";