Asp.Net XML²Ù×÷»ùÀà
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Xml;
using System.Text;
using MSXML2;
namespace EC
{
/// <summary>
/// XML ²Ù×÷»ùÀà
/// </summary>
public class XmlObject : IDisposable
{
//ÒÔÏÂΪµ¥Ò»¹¦Äܵľ²Ì¬Àà
#region ¶ÁÈ¡XMLµ½DataSet
/**************************************************
* º¯ÊýÃû³Æ:GetXml(string XmlPath)
* ¹¦ÄÜ˵Ã÷:¶ÁÈ¡XMLµ½DataSet
* ²Î Êý:XmlPath:xmlÎĵµÂ·¾¶
* ʹÓÃʾÁÐ:
* using EC; //ÒýÓÃÃüÃû¿Õ¼ä
* string xmlPath = Server.MapPath("/EBDnsConfig/DnsConfig.xml"); //»ñÈ¡xml·¾¶
* DataSet ds = EC.XmlObject.GetXml(xmlPath); //¶ÁÈ¡xmlµ½DataSetÖÐ
************************************************/
/// <summary>
/// ¹¦ÄÜ:¶ÁÈ¡XMLµ½DataSetÖÐ
/// </summary>
/// <param name="XmlPath">xml·¾¶</param>
/// <returns>DataSet</returns>
public static DataSet GetXml(string XmlPath)
{
DataSet ds = new DataSet();
ds.ReadXml(@XmlPath);
return ds;
}
#endregion
#region ¶ÁÈ¡xmlÎĵµ²¢·µ»ØÒ»¸ö½Úµã
/**************************************************
* º¯ÊýÃû³Æ:ReadXmlReturnNode(string XmlPath,string Node)
* ¹¦ÄÜ˵Ã÷:¶ÁÈ¡xmlÎĵµ²¢·µ»ØÒ»¸ö½Úµã:ÊÊÓÃÓÚÒ»¼¶½Úµã
* ²Î Êý: XmlPath:xmlÎĵµÂ·¾¶;Node ·µ»ØµÄ½ÚµãÃû³Æ
* ÊÊÓ¦ÓÃXml:<?xml version="1.0" encoding="utf-8" ?>
* <root>
* <dns1>ns1.everdns.com</dns1>
* </root>
* ʹÓÃʾÁÐ:
Ïà¹ØÎĵµ£º
Ò»¡¢asp.netÖе¼³öExeclµÄ·½·¨£º ÔÚ asp.netÖе¼³öExeclÓÐÁ½ÖÖ·½·¨£¬Ò»ÖÖÊǽ«µ¼³öµÄÎļþ´æ·ÅÔÚ·þÎñÆ÷ij¸öÎļþ¼ÐÏÂÃ棬Ȼºó½«ÎļþµØÖ· Êä³öÔÚä¯ÀÀÆ÷ÉÏ£»Ò»ÖÖÊǽ«ÎļþÖ±½Ó½«ÎļþÊä³öÁ÷д¸øä¯ÀÀÆ÷¡£ÔÚResponseÊä³öʱ£¬\t·Ö¸ôµÄÊý¾Ý£¬µ¼³ö execlʱ£¬µÈ¼ÛÓÚ·ÖÁУ¬\nµÈ¼ÛÓÚ»»
Ò»¡¢asp.netÖе¼³öExeclµÄ·½·¨£º
ÔÚ asp.netÖе¼³öE ......
Ò»¡¢ÈÏʶWeb.configÎļþ
Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄWeb.configÎļþ£¬°üÀ¨Ä¬ÈϵÄÅäÖÃÉèÖã¬Ë ......
xtreeView.js
---==========================================================
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
if (ie5||ns6)
var menuobj=document.getElementById("Panel2")
function showmenuie5(e)
{
&n ......
1¡¢IsStartupScriptRegistered£º¶ÔÏóÊÇ·ñ×¢²áÁËÆôÓýű¾¡£
2¡¢IsClientScriptBlockRegistered£º¶ÔÏóÊÇ·ñ×¢²áÁË¿Í»§¶Ë½Å±¾¿é¡£
3¡¢IsClientScriptIncludeRegistered£º¶ÔÏóÊÇ·ñ×¢²áÁË¿Í»§¶Ë½Å±¾°üº¬¡£
µÚÒ»¸öÀý×Ó£º
string info = "<script>alert('ÄãºÃÂð£¿');</script>";
//ÅжÏʼþÊÇ·ñ±»×¢²á£¬Ð´ÈëÇ ......
ÊÇ·ñÑá¾ëÁËÓÃxmlÎļþÀ´×öMagentoµÄÒ³Ãæ²¼¾Ö£¬ÊǵĻ°À´ÊÔÊÔÏÂÃæÕâÖÖ·½Ê½£¬°Ñ²¼¾Ö´úÂëдµ½controller ÀïÃæ
public function mycoolAction()
{
/* ... Some code ...*/
$update = $this->getLayout()->getUpdate();
/* ... Some code ...*/
$this->addActionLayoutHandles();
/* ... Some code ...*/
......