易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net 操作xml

asp.net 对xml文件的读写,添加,修改,删除操作
下面有代码调试正确
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
private XmlDocument xmlDoc;
        //load xml file
        private void LoadXml()
        {
            xmlDoc=new XmlDocument();
            xmlDoc.Load(Server.MapPath("User.xml"));
        }
        //添加节点
        private void AddElement()
        {
            
            LoadXml();
            XmlNode xmldocSelect=xmlDoc.SelectSingleNode("user");
            
            XmlElement el=xmlDoc.CreateElement("person"); //添加person节点
            el.SetAttribute("name","风云"); //添加person节点的属性"name"
            el.SetAttribute("sex","女");   //添加person节点的属性 "sex"
            el.SetAttribute("ag


相关文档:

在asp.net webservice中如何使用session

在使用asp.net编写webservice时,默认情况下是不支持session的,但我们可以把WebMethod的EnableSession选项设为true来显式的打开它,请看以下例子:
1 新建网站WebSite 
2 新建web服务WebService.asmx,它具有以下两个方法:
[WebMethod(EnableSession = true)]
public string Login(string name)
{
   ......

ASP.Net 文件上传大小限制解决方案修改IIS7/7.5配置

IIS 7 默认文件上传大小时30M
要突破这个限制:
1. 修改IIS的applicationhost.config
    打开 %windir%\system32\inetsrv\config\applicationhost.config
     找到: <requestFiltering>节点,
  这个节点默认没有 <requestLimits maxAllowedContentLength="上传 ......

ASP.NET的(HttpModule,HttpHandler)

在以前的ASP时候,当请求一个*.asp页面文件的时候,这个HTTP请求首先会被一个名为inetinfo.exe进程所截获,这个进程实际上就是www服务。截获之后它会将这个请求转交给asp.dll进程,这个进程就会解释这个asp页面,然后将解释后的数据流返回给客户端浏览器。其实ASP.DLL是一个依附在IIS的ISAPI文件,它负责了对诸如ASP文件,A ......

ASP.NET常用的类

系统类
  Type类,Object类,String类, Array类,Console类, Exception类,GC类, MarshalByRefObject类, Math类。
  DateTime结构,Guid 结构,
  ICloneable接口,IComparable接口,IConvertible接口, IDisposable类,
  集合类
  ICollection接口,IComparer接口,IDictionary接口。IDictionaryEnume ......

asp.net 邮件发送

//实例化一个SmtpClientsmtp.DeliveryMethod = SmtpDeliveryMethod.Network;
SmtpClient smtp = new SmtpClient();
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;

//将smtp的出站方式设为 Networksmtp.EnableSsl = false;
//smtp服务器是否启用SSL加密
smtp ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号