asp.netÖÐapp_codeºÍbinÎļþ¼Ð½éÉÜ
Èç¹ûÄúµÄ Web Ó¦ÓóÌÐò°üÀ¨ÒªÔÚ¶à¸öÒ³Ö®¼ä¹²ÏíµÄ´úÂ룬Äú¿ÉÒÔ½«´úÂë±£´æÔÚ Web Ó¦ÓóÌÐò¸ùĿ¼ÏµÄÁ½¸öÌØÊâÎļþ¼Ð£¨Bin Îļþ¼ÐºÍ App_Code Îļþ¼Ð£©ÖеÄij¸öÎļþ¼ÐÖС£
Bin Îļþ¼Ð
¿ÉÒÔÔÚ Bin Îļþ¼ÐÖд洢±àÒëµÄ³ÌÐò¼¯£¬²¢ÇÒ Web Ó¦ÓóÌÐòÈÎÒâ´¦µÄÆäËû´úÂ루ÈçÒ³´úÂ룩»á×Ô¶¯ÒýÓøÃÎļþ¼Ð¡£µäÐ͵ÄʾÀýÊÇÄúΪ×Ô¶¨ÒåÀà±àÒëºÃµÄ´úÂë¡£Äú¿ÉÒÔ½«±àÒëºóµÄ³ÌÐò¼¯¸´ÖƵ½ Web Ó¦ÓóÌÐòµÄ Bin Îļþ¼ÐÖУ¬ÕâÑùËùÓÐÒ³¶¼¿ÉÒÔʹÓÃÕâ¸öÀà¡£
Bin Îļþ¼ÐÖеijÌÐò¼¯ÎÞÐè×¢²á¡£Ö»Òª .dll Îļþ´æÔÚÓÚ Bin Îļþ¼ÐÖУ¬ASP.NET ¾Í¿ÉÒÔʶ±ðËü¡£Èç¹ûÄú¸ü¸ÄÁË .dll Îļþ£¬²¢½«ËüµÄа汾дÈëµ½ÁË Bin Îļþ¼ÐÖУ¬Ôò ASP.NET »á¼ì²âµ½¸üУ¬²¢¶ÔËæºóµÄÐÂÒ³ÇëÇóʹÓÃа汾µÄ .dll Îļþ¡£
Bin Îļþ¼ÐµÄ°²È«ÐÔ
½«±àÒëºóµÄ³ÌÐò¼¯·ÅÈë Bin Îļþ¼ÐÖлá´øÀ´°²È«·çÏÕ¡£Èç¹ûÊÇÄú×Ô¼º±àдºÍ±àÒëµÄ´úÂ룬ÄÇôÄúÁ˽â´úÂëµÄ¹¦ÄÜ¡£µ«ÊÇ£¬Äú±ØÐëÏñ¶Ô´ýÈκοÉÖ´ÐдúÂëÒ»ÑùÀ´¶Ô´ý Bin Îļþ¼ÐÖÐÒѱàÒëµÄ´úÂë¡£ÔÚÍê³É´úÂë²âÊÔ²¢È·ÐÅÒÑÁ˽â´úÂ빦ÄÜ֮ǰ£¬Òª¶ÔÒѱàÒëµÄ´úÂë±£³Ö½÷É÷µÄ̬¶È¡£
Çë×¢ÒâÒÔÏ°²È«·½ÃæµÄ֪ʶ£¬ÕâЩ֪ʶÓëÊÇ·ñ½«ÒѱàÒëµÄ´úÂë·ÅÈë Bin Îļþ¼ÐÓйأº
Bin Îļþ¼ÐÖгÌÐò¼¯µÄ×÷Ó÷¶Î§Îªµ±Ç°Ó¦ÓóÌÐò¡£Òò´Ë£¬ËüÃÇÎÞ·¨·ÃÎʵ±Ç° Web Ó¦ÓóÌÐòÖ®ÍâµÄ×ÊÔ´»òµ÷Óõ±Ç° Web Ó¦ÓóÌÐòÖ®ÍâµÄ´úÂë¡£
ÔËÐÐʱ£¬³ÌÐò¼¯µÄ·ÃÎʼ¶±ðÓɱ¾µØ¼ÆËã»úÉÏÖ¸¶¨µÄÐÅÈ춱ðÈ·¶¨¡£Óйظü¶àÐÅÏ¢£¬Çë²Î¼û ASP.NET ÐÅÈ춱ðºÍ²ßÂÔÎļþ¡£
Èç¹ûÄúʹÓÃÁËÖîÈç Visual Studio ÕâÑùµÄÉè¼ÆÆ÷£¬ÄÇô Bin Îļþ¼ÐÖеĴúÂëÔËÐÐËùÔÚµÄÉÏÏÂÎÄÓëÔËÐÐʱ²»Í¬¡£ÀýÈ磬´úÂë¿ÉÄÜÒÔÍêÈ«ÐÅÈÎ״̬ÔËÐС£
App_Code Îļþ¼Ð
¿ÉÒÔÔÚ App_Code Îļþ¼ÐÖд洢Դ´úÂ룬ÔÚÔËÐÐʱ½«»á×Ô¶¯¶ÔÕâЩ´úÂë½øÐбàÒë¡£Web Ó¦ÓóÌÐòÖеÄÆäËûÈκδúÂ붼¿ÉÒÔ·ÃÎʲúÉúµÄ³ÌÐò¼¯¡£Òò´Ë£¬App_Code Îļþ¼ÐµÄ¹¤×÷·½Ê½Óë Bin Îļþ¼ÐºÜÀàËÆ£¬²»Í¬Ö®´¦ÊÇÄú¿ÉÒÔÔÚÆäÖд洢Դ´úÂë¶ø·ÇÒѱàÒëµÄ´úÂë¡£App_Code Îļþ¼Ð¼°ÆäÔÚ ASP.NET Web Ó¦ÓóÌÐòÖеÄÌØÊâµØλʹÄú¿ÉÒÔ´´½¨×Ô¶¨ÒåÀàºÍÆäËû½öÔ´´úÂëÎļþ£¬²¢ÔÚ Web Ó¦ÓóÌÐòÖÐʹÓÃËüÃǶø²»±Øµ¥¶À¶ÔËüÃǽøÐбàÒë¡£
App_Code Îļþ¼Ð¿ÉÒÔ°üº¬ÒÔ´«Í³ÀàÎļþ£¨¼´´øÓÐ .vb¡¢.cs µÈÀ©Õ¹ÃûµÄÎļþ£©µÄÐÎʽ±àдµÄÔ´´úÂëÎ
Ïà¹ØÎĵµ£º
µ±Ò»¸öÍøÒ³ÖмÈÓÐÊý¾ÝÑéÖ¤¿Ø¼þ£¬ÓÖÓÐÒ»¸ö°´Å¥ÔÚµã»÷ʱ³öÏÖÌáʾ°´Å¥¡£
Èç¹ûÖ±½ÓÔÚÒ³ÃæµÄºǫ́´úÂëµÄPage_Loadº¯ÊýÖÐдÈëbtn.Attributes["Onclick"] = "return confirm('È·¶¨Òª±£´æÊý¾Ý£¿')"£¬ÄÇôÑéÖ¤¿Ø¼þ¾Í»áʧЧ£¬ÒòΪÑéÖ¤¿Ø¼þÒ²ÊÇͨ¹ýjsʵÏֵģ¬ÕâÑùµÄ»°return confirm('È·¶¨Òª±£´æÊý¾Ý£¿')ÏÈÓÚÔÀ´µÄjs´úÂëÖ´ÐУ¬Ì ......
ASP.NETÖ¸ÁîÔÚÿ¸öASP.NETÒ³ÃæÖж¼ÓС£Ê¹ÓÃÕâЩָÁî¿ÉÒÔ¿ØÖÆASP.NETÒ³ÃæµÄÐÐΪ¡£ÏÂÃæÊÇPageÖ¸ÁîµÄÒ»¸öÀý×Ó£º
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
ÔÚASP.NETÒ³Ãæ»òÓû§¿Ø¼þÖÐÓÐ11¸öÖ¸Áî¡£ÎÞÂÛÒ³ÃæÊÇʹÓúǫ́±àÂëÄ£ÐÍ»¹ÊÇÄÚÖñ ......
Ò»¡¢Page Àà
Page ÀàÓëÀ©Õ¹ÃûΪ .aspx µÄÎļþÏà¹ØÁª£»ÕâЩÎļþÔÚÔËÐÐʱ±»±àÒëΪ Page ¶ÔÏ󣬲¢±»»º´æÔÚ·þÎñÆ÷ÄÚ´æÖС£Èç¹ûÊÇʹÓôúÂëÒþ²Ø¼¼Êõ´´½¨ Web ´°ÌåÒ³£¬Çë´Ó¸ÃÀàÅÉÉú¡£
Àý£º£¨public partial class _Default : System.Web.UI.Page£©
Page ¶ ......
² Oracle9iµÄ°²×°£¬Çë²ÎÕÕ¹Ù·½µÄ°²×°ËµÃ÷¡£
² Oracle9i°²×°³É¹¦ÒÔºó£¬Ê¹ÓùÜÀíÔ±£¨Óû§Ãû£ºsys¡¢ÃÜÂ룺sys£©µÄÉí·ÝµÇ¼½øÈ¥£¬´´½¨Ò»¸öÓû§ddymis£¬ÃÜÂ룺ddymis,½ÇɫĬÈϸ³Óèdba¡£
² ......
»ñÈ¡ ASP.NET ÌṩµÄµ±Ç° Session ¶ÔÏó ( HttpSessionState Àà )¡£¸ÃÊôÐÔÌṩÓйص±Ç°ÇëÇóµÄ»á»°µÄÐÅÏ¢¡£Îª´Ó ASP.NET Ó¦ÓóÌÐòÇëÇóÒ³»òÎĵµµÄÿ¸öÓû§Î¬»¤Ò»¸ö Session ¶ÔÏó¡£µ±Óû§ÔÚÓ¦ÓóÌÐòÖдÓÒ»Ò³Òƶ¯µ½Áíһҳʱ£¬´æ´¢ÔÚ Session ¶ÔÏóÖеıäÁ¿²»»á±»·ÅÆú£»Ïà ......