Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

²Ù×÷XML£¬¶ÔXMLµÄÔöɾ¸Ä²é²Ù×÷¡£asp.net C#

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;
namespace jiufen.Web.code
{
public class OperatingXML
{
XmlDocument xmlDoc = new XmlDocument();
//load xml file
private void LoadXml()
{
xmlDoc = new XmlDocument();
xmlDoc.Load(HttpContext.Current.Server.MapPath("xml/User.xml"));//xmlµÄ¸ùĿ¼
}
//Ìí¼Ó½Úµã
public 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("age", "52"); //Ìí¼Óperson½ÚµãµÄÊôÐÔ "age"
XmlElement xesub1 = xmlDoc.CreateElement("pass"); //Ìí¼Óperson½ÚµãµÄÀïµÄ½Úµã
xesub1.InnerText = "22";//ÉèÖÃÎı¾½Úµã
el.AppendChild(xesub1);
XmlElement xesub2 = xmlDoc.CreateElement("Address");
xesub2.InnerText = "À¥Ã÷";//ÉèÖÃÎı¾½Úµã
el.AppendChild(xesub2);
xmldocSelect.AppendChild(el);
xmlDoc.Save(HttpContext.Current.Server.MapPath("xml/User.xml"));
}
//Ð޸Ľڵã
public void UpdateElement()
{
LoadXml();
XmlNodeList nodeList = xmlDoc.SelectSingleNode("user").ChildNodes;//»ñÈ¡bookstore½ÚµãµÄËùÓÐ×Ó½Úµã
foreach (XmlNode xn in nodeList)//±éÀúËùÓÐ×Ó½Úµã
{
XmlElement xe = (XmlElement)xn;//½«×Ó½ÚµãÀàÐÍת»»ÎªXmlElementÀàÐÍ
if (xe.GetAttribute("name") == "ÖܽÜÂ×")//Èç¹ûnameÊôÐÔÖ


Ïà¹ØÎĵµ£º

wxwidgetsÓÃxmlÀ´ÃèÊö½çÃ棬ÔÚ³ÌÐòÀï»ñÈ¡ ±äÁ¿ºÍʼþ

Èç¹û¶Ô½çÃæÃÀ¹Û³ÌÐò±È½Ï¸ß£¬ÊÖд´úÂëÊDz»¿É±ÜÃâµÄ¡£
µ«Èç¹û×öµÄÊÇһЩÏñÖ»ÊÇΪÁËÏÔʾ¡¢¿ØÖÆÖ®ÀàµÄ³ÌÐò£¬¿ÉÄܸü¿ìµÄ°Ñ³ÌÐòµ·¹Ä³öÀ´¾ÍºÃÁË¡£
wxwidgetsÓÐÕâÑùµÄÒ»¸ö¹¦ÄÜ£¬¾ÍÊÇÄÜÓÃxmlд³É½çÃæ¾ÍÄÜÏÔʾ
±à¼­xrcµÄ¹¤¾ßÊÇwxformbuilder,¿ªÔ´Ãâ·ÑµÄ£¬Ò²×ã¹»ÓÃÁË£¬ÎÒÒ»¿ªÊ¼Ã»ÕÒµ½ÔõôÉú³Éxrc,ºóÀ´Ä³´ÎżȻ¿´µ½ÁËÏÂÃæ....Ô­À´ÓÐc ......

ASP.NET ViewState ¼ò½é

  ASP.NET ViewState ÊÇÒ»ÖÖеÄ״̬·þÎñ£¬¿É¹©¿ª·¢ÈËÔ±»ùÓÚÿ¸öÓû§À´¸ú×Ù UI ״̬£¬¸Ã¸¨ÖúÊý¾Ý±»´æ´¢ÔÚÒ»¸öÃûΪ __VIEWSTATE µÄÒþ²Ø×Ö¶ÎÖС£
    µ±È»£¬ ViewState ÔÚ ASP.NET ÖÐÓиöÖØÒªµÄ½ÇÉ«¡£Èç¹ûʹÓÃÇ¡µ±£¬ËüÄܹ»¼ò»¯Ò³Ã濪·¢£¬¸Ä½øÓû§ÓëÕ¾µãµÄ½»»¥¡£Èç¹ûÖÃÖ®²»Àí£¬ËüÄܹ»ÏÔÖøÔö¼ÓÕ¾µãÏìÓ¦´óÐ ......

ASP.NET Ê×Ò³ÐÔÄܵÄÊ®´ó×ö·¨

ASP.NET Ê×Ò³ÐÔÄܵÄÊ®´ó×ö·¨
Ç°ÑÔ
±¾ÎÄÊÇÎÒ¶ÔASP.NETÒ³ÃæÔØÈëËÙ¶ÈÌá¸ßµÄһЩ×ö·¨£¬ÕâЩ×ö·¨·ÖΪÒÔϲ¿·Ö£º
1.²ÉÓà HTTP Module ¿ØÖÆÒ³ÃæµÄÉúÃüÖÜÆÚ¡£
2.×Ô¶¨ÒåResponse.FilterµÃµ½Êä³öÁ÷streamÉú³É¶¯Ì¬Ò³ÃæµÄ¾²Ì¬ÄÚÈÝ(´ÅÅÌ»º´æ)¡£
3.Ò³ÃæGZIPѹËõ¡£
4.OutputCache ±à³Ì·½Ê½Êä³öÒ³Ã滺´æ¡£
5.ɾ³ýÒ³Ãæ¿Õ°××Ö·û´® ......

Integration with the XML Data Type

Integration with the XML Data Type
With the introduction of the XML data type, we wanted to also give FOR XML the ability to generate an instance of XML directly (more precisely, it generates a single row, single column rowset where the cell contains the XML data type instance).
Because of the bac ......

ASP.NET ÅжÏÍøÒ³±àÂë¶ÁÈ¡ÄÚÈÝ£¬·ÀÖ¹ÂÒÂë

×î½üҪдһ¸öÔÚÍøÒ³ÖвéÕҹؼü×Ö¼°Á´½ÓµÄ³ÌÐò£¬ÔÚÊä³öµ½TextBoxµÄʱºò·¢ÏÖ¾­³£³öÏÖÂÒÂ룬ÕûÀíÁËһϸù¾Ý²»Í¬µÄ±àÂëÑ¡È¡ÍøÒ³Ô´Îļþ£¬Ä¿Ç°¿ÉÒÔ½â¾ö¼¸ÖÖ³£±àÂ뷽ʽµÄÍøÒ³£¬¸ÐÐËȤµÄ¿ÉÒÔÊÔÏ¡£
±¾À´ÏëÓÓ£½£½”ÅжϱàÂ룬¸Ð¾õ±È½ÏÂé·³£¬ËùÒÔ¸ÄÓñȽÏÄ£ºýµÄ·½·¨£¬ContainsÓÃÔÚÕâÀïͦ·½±ãµÄ¡£
Contains˵Ã÷£º¾ÍÊÇ·µ» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ