ASP.NETÖн«Êý¾ÝÌí¼Óµ½XML - .NET¼¼Êõ / ASP.NET
string userName = txtUserName.Text.Trim();
string passWord = txtPassWord.Text.Trim();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(Server.MapPath("XMLFile.xml"));
XmlNode xn = xmlDoc.SelectSingleNode("note");//²éÕÒ½Úµã<items>
XmlElement xmlEle = xmlDoc.CreateElement("items");//´´½¨½Úµã<item>
xmlEle.SetAttribute("id", userName);//ÉèÖýڵãµÄÊôÐÔ
xmlEle.SetAttribute("url", passWord);
XmlElement xml2 = xmlDoc.CreateElement("item");
xml2.InnerText = "ºÃ°É";
xmlEle.AppendChild(xml2);//Ìí¼Óµ½<item>½ÚµãÖÐ
xn.AppendChild(xmlEle);
xmlDoc.Save("XMLFile.xml");
Response.Write("<script>alert('Ìí¼Ó³É¹¦£¡')</script>");
XmlElement xmle=(XmlElement)xn;
ÊÇÎÒ´íÁË£¡
ÔÚÕâ֮ǰ£¬Ò»¶¨ÒªÖØÐÂÉú³ÉÒ»±éÏîÄ¿£¬¿´¿´ÓÐûÓо¯¸æ¡£
Æä´Î£¬ÏÂÃæתÌùµÄÊdz£¹æʵÀý»¯´íÎóÔÒò£¬¿ÉÒÔ¶ÔÕÕһϣº
Ê×ÏÈ˵Ã÷³ö´íµÄÔÒòÊÇÄãÓÐÒ»¸ö¶ÔÏóûÓÐʵÀý»¯£¬Ò²¾ÍÊÇûÓÐʹÓùؼü×Önewһϣ¨ÀýÈ磺TexBox TB1 = new TexBox()£¬ÔÙÈ磺DataSet Ds1 = new DataSet()£©£¬Èç¹ûÄ㶼newÁË£¬ÄÇôҲÓпÉÄÜÊÇÄãËùnewµÄ¶ÔÏó²»´æÔÚÁË£¬»òÕßÊÇÔÚ³ÌÐòÖв»¿ÉÓ᣸ø¸óÏÂÒ»¸öÕÒµ½³ö´íÔÒòµÄ·½·¨£º
Ò»¡¢ÄãÈç¹ûÊÇÔÚ±àд³ÌÐò¹ý³ÌÖвâÊÔÕâ¸
Ïà¹ØÎÊ´ð£º
ÎÒÒ»¸öÏîÄ¿£¬Óиö²åÈë²Ù×÷£¬¾ßÌåÊÇÕâÑùµÄ£º
ÎÒÓнø»õÐÅÏ¢±í¡£ÔÚ³ö»õʱѡÔñÏàÓ¦µÄ½ø»õÐÅÏ¢£¬ÊäÈëÊýÁ¿£¬Ñ¡Ôñ²¿Ãź󣬵㱣´æ°´Å¥£¬ÓÉÓÚÍøÂçÑÓʱ£¬µãÒ»ÏÂûÓз´Ó³£¬ÓÚÊÇÓû§¾ÍÓÖµãһϣ¬µ¼ÖÂÒ»´Î²åÈëÁËÁ½Ìõ¼Ç¼:
Àý£º
......
ÔÚaspÀïÔõôµ÷ÓÃjavaдµÄwebservice·½·¨£¬Óкܶ෽·¨
- <message name="RtPnrIn">
<part name="bstrPnrNO" type="s:string" />
<part name ......
aspÐéÄâÖ÷»úʵÏÖα¾²Ì¬µÄ·½·¨£º
1¡¢ ÖØдurl²ÎÊý
Step1: ½¨Á¢Ç°Ì¨Îļþindex.asp£¬ÐÞ¸Äurl²ÎÊýÐÎʽ¡£ÓÉÓÚ¶ÁÈ¡Êý¾Ý¿âÖеļǼ²»ÊÇרÌâµÄÖص㣬¹ÊÖ±½Ó¸ø³ö:
<!--#include file="config.asp" -->
&l ......
´ó¼ÒºÃ!ÎÒÊÇÒ»¸öѧÉú,ÏÖÔÚÊÇѧASPµÄ²»ÖªµÀÔõô»ØÊÂ,ÎÒ×Ô¼ºÊÇÓÃCMS×ö¹ýÍøÕ¾ ´úÂëÒ²ÄÜ¿´¶®Ò»µã ÏÖÔÚÏëÂò±¾Êé,Ïë·¨Óкܶà,¾ÍÊÇÏëÂòASPµÄ ÓÖ¿´µ½´ó¼Ò˵ASPÒÔºóûÓÐNETÇ°¾°ºÃ,ÎÒÓÖÏëÔÙÈ¥Âò±¾ASP.NETµÄ ÎÒÖªµÀÓÐÕâÑùµÄÏë·¨ ......