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»ñÈ¡¿Í»§¶ËIP/Óû§ÃûµÈÐÅÏ¢
1. ÔÚASP.NETÖÐרÓÃÊôÐÔ£º
»ñÈ¡·þÎñÆ÷µçÄÔÃû£ºPage.Server.ManchineName
»ñÈ¡Óû§ÐÅÏ¢£ºPage.User
»ñÈ¡¿Í»§¶ËµçÄÔÃû£ºPage.Request.UserHostName
»ñÈ¡¿Í»§¶ËµçÄÔIP£ºPage.Request.UserHostAddress
2. ÔÚÍøÂç±à³ÌÖеÄͨÓ÷½·¨£º
»ñÈ¡µ±Ç°µçÄÔÃû£ºstatic System. ......
ScriptManager.RegisterStartupScript(p1, this.GetType(), "click", "alert('ok')", true);//p1ÊÇupdatepanelµÄid
ScriptManager.RegisterStartupScript(p1, this.GetType(), "click", "alert('ok')", true);//p1ÊÇupdatepanelµÄid
......
»Ã棺
<asp:HiddenField ID="hfdXuHao" runat="server" />
<asp:TreeView ID="tvMenu" runat="server" CssClass="tvStyle" EnableClientScript="false"
& ......
¾ÍÊÇÔÚʹÓÃjmail·¢ËÍÓʼþʱ£¬Ê¹ÓõÄÊÇ×Ô¶¯É¨Ãè¹æ¶¨¼ä¸ôʱ¼ä×Ô¶¯·¢Ë͵ģ¬ÏÖÔÚÊÇÏëʵÏÖÒѾ·¢Ë͵ÄÓʼþ½«²»ÔÙ·¢ËÍ£¬¸÷λ´óϺÔõôʵÏÖ£¬ÇóÖú£¡
Ê×ÏÈÃ÷È·µÄÊÇÔÚÊý¾Ý¿â±íÖв¢Ã»Óбêʶ×Ö¶ÎÀ´±æ±ðÓʼþÊÇ·ñÒѾ·¢ËÍ¡£Èç¹ûÎÒÀ´ÉèÖÃÒ»¸öÈ«¾Ö±äÁ¿À´´æ´¢ÕâЩÒѾ·¢ËÍÓʼþµÄID£¬È»ºóÔÚÔÙ´ÎɨÃèʱÀ´±æ±ðÕâЩIDÊÇ·ñÒѾ´æÔڵķ½Ê½À´Åжϣ¬¸ ......
ϵͳÀà
¡¡¡¡TypeÀ࣬ObjectÀ࣬StringÀ࣬ ArrayÀ࣬ConsoleÀ࣬ ExceptionÀ࣬GCÀ࣬ MarshalByRefObjectÀ࣬ MathÀà¡£
¡¡¡¡DateTime½á¹¹£¬Guid ½á¹¹£¬
¡¡¡¡ICloneable½Ó¿Ú£¬IComparable½Ó¿Ú£¬IConvertible½Ó¿Ú£¬ IDisposableÀ࣬
¡¡¡¡¼¯ºÏÀà
¡¡¡¡ICollection½Ó¿Ú£¬IComparer½Ó¿Ú£¬IDictionary½Ó¿Ú¡£IDictionaryEnume ......