web.config中如下面一段代码:
<forms loginUrl="/admin/login.aspx" protection="All" name=".AdminNameAuth">
<credentials passwordFormat="Clear">
<user name="admin" password="10000"/>
</credentials>
</forms>
要在aspx中修改name="admin" password="10000"的值,要怎么做,有没有有具体的例子参考。请大家帮忙,先谢过
<forms loginUrl="/admin/login.aspx" protection="All" name=".AdminNameAuth">
<credentials passwordFormat="Clear">
<user name="admin" password="10000"/>
</credentials>
</forms>
要在aspx中修改name="admin" password="10000"的值,要怎么做,有没有有具体的例子参考。请大家帮忙,先谢过
解决方案 »
- 一个读取xml并绑定gridview的问题
- The controller for path '/favicon.ico' was not found or does not implement
- SQL运用 关于上一篇和下一篇
- 请问Asp.net中Server.Transfer()方法和java中的getRequestDispatcher()方法,它们有什么不同
- 把英文的第一个字母转换成大写
- 如何在DropDownList中动态显示指定的项?
- 如何用asp.net 在IIS6 中建立一个网站!
- 急!帮解释一下!
- Request.QueryString 中的问题
- 新手求教:关于IIS的设置
- 求论文名,顶者有分
- 在DataList中的项模板里放入HyperLink控件 在进行链接传值时为何会丢失部分数据??急!急!急!
9 {
10 string fileName = HttpContext.Current.Server.MapPath(@"~\Web.config");
11 XmlDocument xmlDoc = new XmlDocument();
12 xmlDoc.Load(fileName);
13 XmlNodeList topM = xmlDoc.DocumentElement.ChildNodes;
14 foreach (XmlElement element in topM)
15 {
16 #region 取得目标节点,并赋新值
17
18 if (element.Name == "appSettings")
19 {
20 XmlNodeList node = element.ChildNodes;
21 if (node.Count > 0)
22 {
23 foreach (XmlElement el in node)
24 {
25 if (el.Attributes["key"].Value == appSettingsName)
26 {
27 el.Attributes["value"].Value = newValue;
28 xmlDoc.Save(fileName);
29 return;
30 }
31 }
32 }
33 }
34
35 #endregion
36 }
37 }
http://blog.csdn.net/hertcloud/archive/2007/03/19/1533474.aspx
<authentication mode="Forms" >
<forms loginUrl="/admin/login.aspx" protection="All" name=".AdminNameAuth">
<credentials passwordFormat="Clear">
<user name="admin" password="10000"/>
</credentials>
</forms>
</authentication>