ÔõÑùºÏÀíµÄʹÓÃHTML¿Ø¼þ - .NET¼¼Êõ / ASP.NET
ÔÚASP.NET¿ª·¢ÖУ¬ÍøҳˢÐÂÒ»Ö±À§ÈÅ×ÅÎÒ£¬Èç¹ûÎÒʹÓõÄÊÇHTML¿Ø¼þ£¬Ó¦¸ÃÔõÑùµ÷Óúǫ́µÄ·½·¨£¿ HTML°´Å¥ÈçÏ£º <input id="Button5" type="button" value="µ÷ÓÃsayHellow·½·¨"> ºǫ́·½·¨£º public void sayHellow() { Response.Write("ÄãºÃ£¡"); } ÎÒÓ¦¸ÃÔõÑùµ÷ÓÃÕâ¸ö·½·¨£¿
²»ÊǺܶ®ÄãµÄÒâ˼ ¡£¡£¡£ runat=server »òÕßǰָ̨ÏòÒ»¶Îjavascript´úÂ룬ºÍºǫ́½»»¥£¬Õâ¾ÍÊÇËùνµÄAjax ¾ÍËãµ÷ÓÃÒ²²»Ó¦¸ÃÊÇvoidµÄ·½·¨ ÎÒ¾ÍÊDz»ÏëÓ÷þÎñÆ÷¿Ø¼þ°¡£¡¾ÍÊÇÖ±½ÓÓÃVSÌṩµÄHTML¿Ø¼þµ÷ÓÃ.CSÎļþÀïµÄ·½·¨£¬ÕâÑù£¬»òÐí¿ÉÒÔ½â¾öÎÒµÄÍøҳˢеÄÎÊÌâ¡£µ«ÊÇ£¬ÎÒ¾ÍÊDz»ÖªµÀÔõôʹÓᣠÏÖÔÚÉÏÃæµÄ´óϺ¸øÁËÎÒÁ½¸ö·½·¨£º 1¡¢²»Ó÷µ»ØֵΪvoidµÄ·½·¨ 2¡¢ÔÚÉÏÃæдһ¸öjavascriptµÄ´úÂë µ«ÊÇ£¬ÎÒÕâÁ½Õ߶¼²»»áÓã¬Ï£ÍûÄãÃÇÄܹ»°ïÖúÎÒ¡£ ÄãÓеãÉá±¾ÖðÄ©. Ò»¸öËã·¨µÄÓÅ»¯»òÉè¼ÆºÏÀíµÄ¼Ü¹¹½ÚÔ¼µÄʱ¼äÏ൱ÓÚÄã²»Ó÷þÎñÆ÷¿Ø¼þ¸ÄÓÃhtml¿Ø¼þËù"½ÚÔ¼"µÄʱ¼äµÄ¼¸°Ù¼¸Ç§±¶. <input id="Button5" type="button" value="µ÷ÓÃsayHellow·½·¨" runat="server" onclick="sayHellow()"> ÒýÓà <input id="Button5" type="button" value="µ÷ÓÃsayHellow·½·¨" runat="server" onclick="sayHellow()"> ²»ÓüÓrunat="server" ÓÃjs·½·¨ÍêÈ«¿ÉÒÔ£¬ Ã÷Ìì¸øÄãÒ»¸öÎÒÏîÄ¿Àï³£ÓõÄjs´úÂëÒýÓà Ò
Ïà¹ØÎÊ´ð£º
Imports System.ComponentModel Imports System.Web.UI Imports System.Web.UI.Design Imports System.Web.UI.WebControls Namespace CBDAspNet.WebControls.HTML ''' <summary> '' ......
ÎÒÓõÄÊÇÁ¬½Ó³Ø×öµÄ£¬ÅäÁ¬½Ó³ØµÄ·½·¨Ó¦¸ÃûÓÐ´í£¬ÎªÊ²¾ÍÊdzöÏÖÕâÖÖÎÊÌâ javax.servlet.ServletException: javax.naming.NameNotFoundException: No object bound to name java:comp/env/test ÇëÎÊ´óÏÀÃÇÕâÊÇÔ ......
ÎÒÅóÓѵÄÒ»¸öASP.NETÒýÓÃÁËajax¼¼Êõ£¬binĿ¼ÏÂÃæÒ²ÓÐajaxpro.dll£¬ÎªÊ²Ã´·þÎñÆ÷²»ÐèÒª°²×°ajax²å¼þÒ²¿ÉÒÔÔËÐÐÄØ£¬ÕÕÀí˵Ӧ¸ÃÒª°²×°ASPAJAXExtSetup.msi ÓÐ ajaxpro.dll¾Í¿ÉÒÔÁË ²»Í¬µÄaajx×é¼þ AjaxPro¾ÍÊÇ¿ò¼ ......
asp.netÅúÁ¿ÉÏ´«Í¼Æ¬×îºÃÓÐÔ´Â룬ÔÚÏߵȣ¡£¡£¡£¡£¡£¡£¡ Ô´ÂëºÜ³¤µÄ¡£ ²Î¿¼ C# code: HttpFileCollection files = HttpContext.Current.Request.Files; if (files.Count <= 1) { ......