asp.netµÄÒì³£´¦Àí»úÖÆ
³ÌÐò¿ª·¢ÖУ¬Êý¾ÝÁ÷°´ÕÕÒ»¶¨µÄ¹æÂɽøÐд«Ê䣬Èç¹ûÓû§ºÍ³ÌÐòÖ®¼äµÄ½»»¥ÍêÈ«°´ÕÕÔ¤¶¨µÄЧ¹ûÔËÐУ¬³ÌÐò²»»á³öÏÖÎÊÌâ¡£¿ÉÒÔ¼ÙÉèËù´¦ÀíµÄÊý¾Ý¶¼·ûºÏÒªÇó£¬Í¨¹ý½çÃæ×÷¸ñʽÅж¨£¬ËùÓÐ×ÊÔ´¶¼ÕýÈ·£¬µ«ÊÇΪÁËϵͳµÄ°²È«£¬ÐèÒª´¦Àí´æÔÚµÄÒþ»¼£¬²»ÄܶÔÊý¾Ý°²È«±§ÓÐÀíÏ뻯µÄÏë·¨¡£
ÔÚASP.NETÖУ¬´íÎó´¦Àí·ÖΪÁ½¸ö²ãÃ棺ҳÃæÊäÈëÐÅÏ¢ÑéÖ¤¡¢CLRÌṩµÄ½á¹¹»¯´íÎó´¦Àí»úÖÆ¡£ÔÚÒ³ÃæÊäÈëÐÅÏ¢ÅжÏÖУ¬¿ÉÒÔ²ÉÓÃJavaScript¡¢VBScriptµÈ½Å±¾½øÐÐÅжϣ¬Ò²¿ÉÒÔʹÓÃ.NET »·¾³Ï´øÓеÄValidationºÍÕýÔò±í´ïʽµÄ·½Ê½½«ÐÅÏ¢ÔÚÌá½»Ö´Ðд¦ÀíÇ°£¬½øÐиñʽÅжϡ£¸ñʽÅжϰüÀ¨£ºÍøÂçµØÖ·¡¢µç×ÓÐÅÏä¡¢ÊäÈë×Ö·û´®³¤¶ÌºÍÊäÈëÐÅÏ¢µÄÊý¾ÝÀàÐ͵ÄÅжϵȡ£
½á¹¹»¯Òì³£´¦ÀíÊÇCLRµÄ»ù´¡²¿·Ö£¬¾ßÓÐÒÔÏÂÌص㣺¿ÉÒÔ¿çÓïÑÔ£¬Òì³£¿ÉÒÔÔÚÒ»ÖÖÓïÑÔÖÐÒý·¢£¬ÔÚÁíÍâÒ»ÖÖÓïÑÔÖв¶×½´¦Àí£»·Ö²ã´¦Àí£¬Ò»¸öÒì³£¿ÉÒÔ°üÀ¨ÁíÍâÒ»¸öÒì³££¬ÕâÒâζ×Åϵͳ¿ÉÒÔ²¶»ñµ×²ã¶ÔÏó£¨ÈçÊý¾Ý²ãºÍÒµÎñ²ã£©µÄÒì³££¬Òý·¢×Ô¼ºµÄÒì³££¬°üº¬Óеײã¶ÔÏóµÄÒì³£¡£ÕâÑù¿ÉÒÔ½«Òì³£½øÐÐϸÖ·ÖÀ࣬ʹµÃÒì³£¸üÈÝÒ×´¦Àí¡£
½á¹¹»¯Òì³£´¦Àí£¬Ò»°ãҪʹÓÃ3²¿·Ö´úÂë¡£
£¨1£©Try£ºÊdzÌÐòÖпÉÄܳöÏÖ´íÎóµÄ²Ù×÷²¿·Ö¡£
£¨2£©Catch£ºÊÇÓÃÀ´´¦Àí¸÷ÖÖ´íÎóµÄ²¿·Ö£¨¿ÉÒÔÓжà¸ö£©¡£±ØÐëÕýÈ·ÅÅÁⶻñÒì³£µÄCatch×Ӿ䣬·¶Î§Ð¡µÄException·ÅÔÚÇ°ÃæµÄCatch¡£¼´Èç¹ûExceptionÖ®¼ä´æÔڼ̳йØϵ£¬¾ÍÓ¦°Ñ×ÓÀàµÄException·ÅÔÚÇ°ÃæµÄCatch×Ó¾äÖС£
£¨3£©Finally ¿éµÄ´úÂëÓÃÀ´ÇåÀí×ÊÔ´»òÖ´ÐÐÒªÔÚTry¿éĩβִÐеÄÆäËû²Ù×÷£¨¿ÉÒÔÊ¡ÂÔ£©¡£ÎÞÂÛÊÇ·ñ²úÉúÒì³££¬Finally¿é¶¼»áÖ´ÐС£
½á¹¹»¯Òì³£´¦Àí
Òì³£ÊÇÔÚ³ÌÐòÉè¼ÆÖÐÎÞ·¨±ÜÃâµÄ´íÎó£¬Éè¼ÆµÄ³ÌÐò±ØÐëÄܹ»´¦ÀíËùÓпÉÄܳöÏֵĴíÎó¡£ËùÒÔҪȫÃ濼ÂÇÒì³£´¦Àí£¬½«Ò»ÇпÉÄܳöÏÖÒì³£µÄ´úÂ붼½øÐÐtryµÄ²¶×½£¬È»ºó½¨Á¢×Ô¼ºµÄÒì³£´¦Àí»úÖÆ£¬°´ÕÕ²»Í¬µÄÒì³£Çé¿ö½øÐзÖÀà´¦Àí¡£
Òì³£²úÉúµÄʱºò£¬ÐèÒªÖªµÀÊÇʲôÔÒòÔì³ÉµÄ´íÎóÒÔ¼°´íÎóµÄÏà¹ØÐÅÏ¢¡£¸ù¾Ýʵ¼ÊÇé¿öÅ׳ö¾ßÌåÀàÐ͵ÄÒì³££¬È»ºó½¨Á¢²¶×½»úÖÆ£¬²¶×½µ½Ò쳣ʱ×ö³ö¾ßÌåµÄ´¦Àí¡£ÔÚ±àд´úÂë¹ý³ÌÖУ¬¿ÉÒÔʹÓÃϵͳÒѶ¨ÒåµÄÏà¹ØÒì³£ÀàÒÔ¼°×Ô¶¨ÒåµÄÒì³£ÀàÀ´ÊµÀý»¯²¢Å׳öÐèÒªµÄÒì³£¡£ÈçÒ»¸ö²»¿ÉÄÜʵÏֵĽӿڣ¬¿ÉÒÔÅ׳öSystem.NotSupportedExceptiionµÄÒì³£À´¸æË߽ӿڵĵ÷ÓÃÕß¡£
ÔÚ´¦ÀíÒì³£
Ïà¹ØÎĵµ£º
DateTime dt = DateTime.Now;
// Label1.Text = dt.ToString();//2005-11-5 13:21:25
// Label2.Text = dt.ToFileTime().ToString();//127756416859912816
// Label3.Text = dt.ToFileTimeUtc().ToString();//127756704859912816
// Labe ......
ASP.NET defines an application as the sum of all files, pages, handlers, modules, and executable code that can be invoked or run in the scope of a given virtual directory (and its subdirectories) on a Web application server. For example, an "order" application might be published in the "/order" virt ......
¹ØÓÚÒ³Ãæ´«ÖµµÄ·½·¨£¬Òý·¢Á˺ܶàÌÖÂÛ¡£¿´À´ÓкܶàÈ˹Ø×¢Õâ¸ö£¬ÎÒ¾ÍÎÒ¸öÈ˹۵ã×öÁËЩ×ܽᣬϣÍû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
1. ʹÓÃQueryString±äÁ¿
QueryStringÊÇÒ»Öַdz£¼òµ¥µÄ´«Öµ·½Ê½£¬Ëû¿ÉÒÔ½«´«Ë͵ÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖС£Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṹ¼òµ¥µÄÊýֵʱ£¬¿ÉÒÔʹÓÃÕâ¸ö·½·¨¡£µ«ÊǶÔÓÚ´«µÝÊ ......
Label——height£º¸ß¶È
width£º¿í¶È
backcolor£º±³¾°É«
......