try
{
XmlDocument doc = new XmlDocument();
string filename = Server.MapPath(".//XML//User.xml");
doc.Load(filename);
XmlNode root = doc.DocumentElement;
XmlNode user = doc.CreateElement("user");
DataSet ds = new DataSet();
ds.ReadXml(filename);
int userid = ds.Tables[0].Rows.Count+1;
//写入userid
XmlElement elem6 = doc.CreateElement("userid");
elem6.InnerText = userid.ToString();
user.AppendChild(elem6);
//写入用户名
XmlElement elem1 = doc.CreateElement("username");
elem1.InnerText = this.Txt_username.Text.Trim();
user.AppendChild(elem1);
//写入密码
XmlElement elem2 = doc.CreateElement("userpass");
elem2.InnerText = this.Txt_pasw.Text.Trim();
user.AppendChild(elem2);
//写入Email
XmlElement elem3 = doc.CreateElement("usermail");
elem3.InnerText = this.Txt_usermail.Text.Trim();
user.AppendChild(elem3);
//写入QQ
XmlElement elem4 = doc.CreateElement("usersite");
elem4.InnerText = this.Txt_siteurl.Text.Trim();
user.AppendChild(elem4);
//写入MSN
XmlElement elem5 = doc.CreateElement("usermsn");
elem5.InnerText = this.Txt_msn.Text.Trim();
user.AppendChild(elem5);
//写入日期
XmlElement elem8 = doc.CreateElement("ndate");
elem8.InnerText = DateTime.Now.ToString();
user.AppendChild(elem8);
root.AppendChild(user);
doc.Save(filename);
this.Lab_flag.Text = "注册成功!";
this.HyperLink1.Visible=true;
this.Txt_username.Text="";
this.Txt_pasw.Text="";
this.Txt_firpasw.Text="";
this.Txt_usermail.Text="";
this.Txt_msn.Text="";
this.Txt_siteurl.Text="";
return true;
}
catch(Exception ex)
{
this.Lab_flag.Text = ex.Message;
return false;
}
发表评论
-
ipchange
2009-11-23 21:00 658public string ipChange(u ... -
C# excel
2009-09-17 13:09 2164using System; using System. ... -
遍历类的属性
2009-08-12 11:23 738Response.Write(getProperties(l ... -
SqliteHelper
2009-07-27 14:46 1346using System; using Syst ... -
网址收藏
2009-07-23 14:50 697http://www.cnblogs.com/arte ... -
。net常用工具
2009-07-23 14:48 1745ildasm:反编译.net程序; ilasm:编译 ... -
c#生成Excel
2009-07-23 14:45 2541using System;using System.Colle ... -
C#操作Word!
2009-07-23 14:44 3775using System; using System.Com ... -
验证控件网页代码分析2
2009-07-23 14:43 936还有一个子程序是更新整个页面的验证状态: //更新整个页面 ... -
验证控件网页代码分析
2009-07-23 14:38 1529如果我们在文本框中什么都没有输入,直接点击按钮,则激发Butt ... -
xml操作
2009-07-23 14:32 697using System; using System.Xml ... -
ip地址转换
2009-07-23 14:30 1102public String getIp(long ip10) ... -
BASE64加密解密
2009-07-23 14:28 786string base64EncodeChars = & ... -
winform Splash加载窗口
2009-07-23 14:28 1867static ApplicationContext conte ... -
C#实现快捷键(系统热键)响应
2009-07-23 14:27 1879C#实现快捷键(系统热键)响应 在应用中,我们可能会需要 ... -
WinForm的一些常用技巧
2009-07-23 14:22 2178在任务栏不显示 将WinForm的ShowInT ... -
去除文本中的标签
2009-07-23 14:10 735/// <summary> / ... -
C#验证码
2009-07-23 14:03 1240using System; using System.Dra ... -
des和RSA两种加密方式的例子
2009-07-23 13:50 1307static public string RSA_Encry ...
相关推荐
ASP.NET 2.0 中的数据源控件 使用 ASP.NET 2.0 ObjectDataSource 控件 ASP.NET 2.0 的内部变化 使用SQL Cache Dependency 代替 Ibatisnet 提供的CacheModel ASP.NET 2.0中小心Profile命名冲突 使用ASP.NET 2.0 ...
asp.net 4揭秘.第1卷》 第一部分 构建asp.net页面 第1章 asp.net framework概览2 1.1 asp.net和.net framework5 1.1.1 框架类库5 1.1.2 公共语言运行库10 1.2 asp.net控件11 1.2.1 asp.net控件概览11 1.2.2 html控件...
ASP.NET AJAX将ASP.NET/.NET Framework中的服务器端编程技术引入到客户端框架,从而带来了客户端编程的丰富特性。本书主要阐述ASP.NET AJAX是如何在客户端模拟这些丰富特性的。 本书通过大量实例、深入的描述以及...
9.3 在SqlDataSource控件中使用ASP.NET参数 271 9.3.1 使用ASP.NET参数对象 272 9.3.2 使用ASP.NET的Control-Parameter对象 274 9.3.3 使用ASP.NET的Cookie-Parameter对象 277 9.3.4 使用ASP.NET的Form-Parameter...
17.4.3 ASP.NET MVC 跨页数据呈现(TempData) 17.4.4 ASP.NET MVC页面重定向 17.4.5 ASP.NET MVC URL路由(URLRouting) 17.4.6 ASP.NET MVC控件辅助工具(Helper) 17.4.7 ASP.NET MVC表单传值 17.5 小结 第18章 ...
17.4.3 ASP.NET MVC 跨页数据呈现(TempData) 17.4.4 ASP.NET MVC 页面重定向 17.4.5 ASP.NET MVC URL 路由(URLRouting) 17.4.6 ASP.NET MVC 控件辅助工具(Helper) 17.4.7 ASP.NET MVC 表单传值 17.5 小结 第 ...
这是整部学习资料 由于太大第一章免费供应给大家 在我的上传资源中 如果觉得还不过希望大家给...17.4.3 ASP.NET MVC 跨页数据呈现(TempData) 17.4.4 ASP.NET MVC页面重定向 17.4.5 ASP.NET MVC URL路由(URLRouting)...
17.4.3 ASP.NET MVC 跨页数据呈现(TempData) 17.4.4 ASP.NET MVC页面重定向 17.4.5 ASP.NET MVC URL路由(URLRouting) 17.4.6 ASP.NET MVC控件辅助工具(Helper) 17.4.7 ASP.NET MVC表单传值 17.5 小结 第18章 ...
17.4.3 ASP.NET MVC 跨页数据呈现(TempData) 17.4.4 ASP.NET MVC页面重定向 17.4.5 ASP.NET MVC URL路由(URLRouting) 17.4.6 ASP.NET MVC控件辅助工具(Helper) 17.4.7 ASP.NET MVC表单传值 17.5 小结 第18章 ...
以文件为基础的依赖是最有用的,文件依赖项是通过使用 Cache.Insert 并提供引用文件的 CacheDependency 对象添加的 Cache.Insert("MyData", Source, new CacheDependency(Server.MapPath("authors.xml")));
四、关于ASP.NET中的代码隐藏文件的描述正确的是( )。 A.Web窗体页的程序的逻辑由代码组成,这些代码的创建用于与窗体交互。该文件称作为“代码隐藏”文件,如果用C#创建,该文件将具有“.ascx.cs”扩展名 B.web...
ASPNET35开发大全非常好 书名:ASP.NET 3.5 开发大全 署名:郭靖 页数:722 ...17.4.3 ASP.NET MVC 跨页数据呈现(TempData) 17.4.4 ASP.NET MVC页面重定向 17.4.5 ASP.NET MVC URL路由(URLRouting) ...
实例374 调用Cache.Insert()指定XML文件缓存 依赖项 589 实例375 Cache.Remove()方法将数据项从缓存 中移除 591 实例376 CacheItemRemovedCallback委派缓存 移除通知 592 15.2 缓存数据的自动移除与依赖项的 应用 ...
以文件为基础的依赖是最有用的,文件依赖项是通过使用 Cache.Insert 并提供引用文件的 CacheDependency 对象添加的 代码如下:Cache.Insert(“MyData”, Source, new CacheDependency(Server.MapPath(“authors.xml...
│ │ Languages.xml.2005-03-22.10-39-19.7187 │ │ │ ├─office2000 │ │ │ bold.gif │ │ │ bulletedlist.gif │ │ │ copy.gif │ │ │ createlink.gif │ │ │ cut.gif │ │ │ delete.gif │ │ ...
ExtAspNet v2.2.1 ExtAspNet是一组专业的Asp.net控件库,拥有原生的AJAX支持和丰富的UI效果, 目标是创建没有JavaScript,没有... -在Page_Load中设置了哪些需要在AJAX中更新的Asp.net控件会在回发时保持状态,可以...
-这个属性和Button得ValidateForms属性类似,可以查看Asp.net compatibility中的示例。 +2009-08-25 v2.0.7 -为按钮增加DisableControlBeforePostBack属性 - 回发之前是否禁用按钮,防止重复提交 - 默认为...