asp.netºǫ́Óëǰ̨µÄ»¥Ïàµ÷ÓÃ
Ò».ºǫ́µ÷ÓÃǰ̨
1.Page.ClientScript.RegisterStartupScript(type,"",script);
Àý:
string script = string.Format("<script>alert('Wrong');</script>");
Page.ClientScript.RegisterStartupScript(GetType(), "Load", script);
2.¶ÔÏó.Attributes.Add("ʼþ","script")
Àý:
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#ECECFF'");
¶þ.ǰ̨µ÷Óúǫ́
1.Ò»°ãûÓбØÒªÔÚhtmlÎļþÀïµ÷ÓÃcsÎļþ.
Ïà¹ØÎĵµ£º
test.xml
<?xml version="1.0" encoding="utf-8" ?>
<root>
<R SecuCode="601600" Glossary="ѧITÍø²âÊÔ»ñÈ¡XML½á¹ûÏÔʾÕý³££¬¡£¡£¡£¡£¡£¡£¡£¹þ¹þ" />
<R SecuCode="600056" Glossary="²âÊÔµÚ¶þ¸ö£¬¡£¡£¡£¡£¡£¡£¡£¹þ¹þ" />
</root>
ÏÂÃæ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 XmlDo ......
1>>δÄܼÓÔØÎļþ»ò³ÌÐò¼¯“System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35”»òËüµÄijһ¸öÒÀÀµÏϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£
½â¾ö£ºµ½C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 1.0\Assemblies ÏÂÕÒµ½ System.Web.Mvc.dll Îļþ ¸´ÖƵ½ÏîÄ¿µÄbinÄ¿Â¼Ï ......
Asp.Net FormsÑéÖ¤(×Ô¶¨Òå¡¢½ÇÉ«Ìṩ³ÌÐò¡¢µ¥µãµÇ¼)
ÒÔÇ°¿ª·¢ÏîĿʱ¾³£ÊÇ×Ô¼º¿ª·¢Ò»Ì×Óû§È¨ÏÞ¹ÜÀíϵͳ½øÐÐÑéÖ¤£¬±È½ÏÁé»î¡£×î½üΪÁ˵¥µãµÇ¼µÄÎÊÌâÓÖ°ÑAsp.Net×Ô´øµÄÑéÖ¤·½Ê½¿´ÁËÒ»±é£¬·¢ÏÖÕâÖÖ·½Ê½Ò²±È½Ï·½±ã£¬¹¦ÄÜÒ²»¹¿ÉÒÔ¡£ÔÚAsp.NetÌṩÁËÈýÖÖ³£ÓõÄÑéÖ¤·½Ê½£ºWindows·½Ê½ÊǺÍIIS½áºÏÆðÀ´¿ÉÒÔʵÏÖ»ù±¾¡¢ÕªÒª¡¢¼¯³É ......