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

Asp.net ºǫ́µ÷ÓÃjs·½·¨(ת)

1. ÓÃResponse.Write·½·¨
¡¡¡¡´úÂëÈçÏ£º
Response.Write("<script type='text/javascript'>alert("XXX");</script>");
´Ë·½·¨È±ÏݾÍÊDz»Äܵ÷Óýű¾ÎļþÖеÄ×Ô¶¨ÒåµÄº¯Êý£¬Ö»Äܵ÷ÓÃÄÚ²¿º¯Êý£¬¾ßÌåµ÷ÓÃ×Ô¶¨ÒåµÄº¯ÊýÖ»ÄÜÔÚResponse.WriteдÉϺ¯Êý¶¨ Ò壬±ÈÈç
Response.Write("<script type='text/javascript'>function myfun(){}</script>");
2.ÓÃClientScriptÀà
¡¡¡¡´úÂëÈçÏ£ºÔÚÏëµ÷ÓÃij¸öjavascript½Å±¾º¯ÊýµÄµØ·½Ìí¼Ó´úÂ룬עÒâÒª±£Ö¤MyFunÒѾ­Ôڽű¾ÎļþÖж¨Òå¹ýÁË¡£
    ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>MyFun();</script>");
¡¡¡¡Õâ¸ö·½·¨±ÈResponse.Write¸ü·½±ãһЩ£¬¿ÉÒÔÖ±½Óµ÷Óýű¾ÎļþÖеÄ×Ô¶¨Ò庯Êý¡£
3.ÆÕͨµÄÌí¼Ó¿Ø¼þµÄAttributesÊôÐÔ
¡¡¡¡¶ÔÓÚÆÕͨ°´Å¥¾ÍÊÇ£ºButton1.Attributes.Add("onclick","MyFun();");
¡¡¡¡Ö»ÄÜÔÚOnloadÖлòÀàËÆÓÚonloadµÄ³õʼ»¯¹ý³ÌÖÐÌí¼Ó²ÅÓÐЧ¡£¶øÇÒÊÇÏÈÖ´Ðнű¾º¯Êý£¬ÎÞ·¨¸Ä±äÖ´ÐÐ˳Ðò¡£
×¢Ò⣬ÒÔÉÏËùÓз½·¨ÖУ¬ºǫ́´úÂë¶¼²»ÄÜÓÐת»¯µ±Ç°Ò³µÄ´úÂ룬±ÈÈçRedirectµÈ£¬Òª°Ñתҳ´úÂë·ÅÔڽű¾ÀïÃæ


Ïà¹ØÎĵµ£º

ASP.NET×Ô¶¨Òå´íÎóÒ³Ãæ

 ASP.NET ÌṩÈýÖÖÓÃÓÚÔÚ³öÏÖ´íÎóʱ²¶»ñºÍÏìÓ¦´íÎóµÄÖ÷Òª·½·¨£ºPage_Error ʼþ¡¢Application_Error ʼþÒÔ¼°Ó¦ÓóÌÐòÅäÖÃÎļþ (Web.config)¡£
Èç¹ûÄú²»µ÷Óà Server.ClearError »òÕß²¶»ñ Page_Error »ò Application_Error ʼþÖеĴíÎó£¬Ôò½«¸ù¾Ý Web.config ÎļþµÄ <customErrors> ²¿·ÖÖеÄÉèÖô¦Àí´íÎó¡£ÔÚ & ......

ÑÝÁ·£ºÊ¹Óà XCOPY ²¿Êð ASP.NET Web Ó¦ÓóÌÐò

ÑÝÁ·£ºÊ¹Óà XCOPY ²¿Êð ASP.NET Web Ó¦ÓóÌÐò
²¿Êð ASP.NET Ó¦ÓóÌÐò·Ç³£¼òµ¥¡£ÄúÐèÒª½«Ëù´´½¨µÄÓ¦ÓóÌÐòÎļþ´Ó¿ª·¢¼ÆËã»ú¸´ÖƵ½½«³ÐÔØÓ¦ÓóÌÐòµÄ³ÉÆ· Web ·þÎñÆ÷¡£¿ÉÒÔʹÓà XCOPY ÃüÁîÐй¤¾ß»òϲ»¶µÄ FTP Ó¦ÓóÌÐò£¬½«Îļþ´ÓÒ»¸öλÖø´ÖƵ½ÁíÒ»¸öλÖá£Óйس£¹æ²¿ÊðµÄ¸ü¶àÐÅÏ¢£¬Çë²Î¼û .NET Framework ²¿Êð»ù´¡¡£
×¢Òâ ......

ASP.NET(c#)ÓïÒôÑéÖ¤ÂëÖÆ×÷(¸½Ô´´úÂë)

×î½ü·¢ÏÖÓïÒôÑéÖ¤ÂëÔ½À´Ô½Á÷ÐУ¬±ÈÈçÓдÎÔÚ×¢²ágmailÓÊÏä¿´µ½¹ý£¬»¹ÓÐmsnÒ³ÃæÒ²ÓÐÓïÒôÑéÖ¤Â룬»¹ÓйúÍâÒ»Ð©ÍøÕ¾µÈ¡£
»¨Ê±¼äÑо¿ÁËÏ£¬ÓïÒôÑéÖ¤ÂëÖ÷Òª¸úÒ»°ãÑéÖ¤ÂëµÄÇø±ð¾ÍÔÚÓÚÈçºÎÈÃÑéÖ¤Âë²¥·Å¡£±¾ÎÄÓïÒôÑéÖ¤ÂëÔ­Àí£º´Ó·þÎñÆ÷Éú³ÉÑéÖ¤Â룬
²¢±£´æµ½cookieÖУ¨getcode.aspx.cs£©,µ±µãÊÕÌýÑéÖ¤ÂëµÄʱºò£¬µ÷ÓÃjavascirpt²Ù×÷ ......

ASP.NET


      ͨ¹ý SqlDataSource ¿Ø¼þ£¬¿ÉÒÔʹÓà Web ·þÎñÆ÷¿Ø¼þ·ÃÎÊλÓÚ¹ØÏµÊý¾Ý¿âÖеÄÊý¾Ý¡£ÆäÖпÉÒÔ°üÀ¨ Microsoft SQL Server ºÍ Oracle Êý¾Ý¿âÒÔ¼° OLE DB ºÍ ODBC Êý¾ÝÔ´¡£Äú¿ÉÒÔ½« SqlDataSource ¿Ø¼þÓëÊý¾Ý°ó¶¨¿Ø¼þ£¨Èç GridView¡¢FormView ºÍ DetailsView ¿Ø¼þ£©Ò»ÆðʹÓã¬Óü«ÉÙ´úÂë»òÉõÖÁ² ......

asp.netÈ¡µÃϵͳʱ¼äÈÕÆÚµÄ¸÷ÖÖÐÎʽ

////½ñÌìÔÚÐ޸ijÌÐòµÄʱºò·¢ÏÖÒ»¸öСµÄÎÊÌâÌØ¼Ç¼ÈçÏÂ:
//////ÓÐʱºòdatetimeÎÞ·¨×ª³Éstring£¬¿ÉÒÔÓÃgetdate()Ö±½Ó²åÈë¾Í¿ÉÒÔÁË
string str = "update adaddress set shenhe=" + ck + " ,shentime=getDate() where id=" + uid + "";
/////////////////////////////////////////
ÒÔϾßÌå½éÉÜÈÕÆÚÔõÑùת»»
DateTime.Now ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ