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

[ת]ASP.NET¶àƵµÀÍøÕ¾¼Ü¹¹ÐĵÃ

asp.net¶àƵµÀÍøÕ¾¿ª·¢¼Ü¹¹Ç³Îö http://www.cnblogs.com/Kenny-Jiang/archive/2007/07/31/837900.html ±³¾°£º
        ÎÒÃÇ´ò¿ªÃÅ»§Íøվʱ£¬ÍùÍù»á¿´µ½ºÜ¶àÅÅÁнôÃܵÄƵµÀÁÐ±í£¬Èç¡°ÐÂÎÅ¡±¡¢¡°²Æ¾­¡±¡¢¡°ÓéÀÖ¡±µÈ¡£ÆµµÀΪÍøÕ¾ÌṩÁË·½±ãµÄµ¼º½¹¦ÄÜ¡£
ÄÚÈÝÃèÊö£º
        ±¾ÎÄÖ÷ÒªÌÖÂÛÔÚasp.net¿ò¼ÜÏÂʵÏÖ¶àƵµÀÍøÕ¾¼Ü¹¹µÄ¼¸ÖÖ·½°¸£¬²¢´Ó´úÂëÖØÓÃÐÔ¡¢¿ª·¢·½Ê½¡¢²¿Êð·½Ê½µÈ¼¸¸ö·½ÃæÀ´¶Ô¸÷·½°¸½øÐзÖÎö¡¢±È½Ï¡£
֪ʶ׼±¸£º
        ±¾ÎÄÖÐÌáµ½µÄ¸÷¼Ü¹¹·½°¸¾ù»ùÓÚMVC(Model-View-Controller)ģʽ£¬¶Ô¸ÃģʽÖи÷×é³É²¿¼þ×÷Èçϼò¶ÌÃèÊö£º
        Model£º°üº¬ÒµÎñÂß¼­²Ù×÷ÒÔ¼°Êý¾Ý·ÃÎʲÙ×÷;
        View£º°üº¬UI´¦ÀíÏà¹Ø²Ù×÷;
        Controller£º¿ØÖƲ¢Ð­µ÷ViewÓëModelµÄ´¦Àí¹ý³Ì ¸÷·½°¸±È½Ï£º
·½°¸ ¼Ü¹¹ÃèÊö ´úÂëÖØÓÃÐÔ ¿ª·¢·½Ê½ ²¿Êð·½Ê½ ·½°¸Ò» ΪÕû¸öÍøÕ¾½¨Á¢Ò»¸öWeb Project¡£
ÿ¸öƵµÀ¶ÔÓ¦ÓÚWeb ProjectÖеÄÒ»¸öĿ¼£¬ÓеãÀàËÆÓÚASPµÄ´¦Àí·½Ê½¡£
Model²¿¼þ¼È¿ÉÒÔ°üº¬ÓÚWeb ProjectÖУ¬Ò²¿ÉÒÔ·â×°³ÉClass Library¡£ ½«Model²¿¼þ·â×°³ÉClass Libraryºó½«»ñµÃ½Ï¸ßµÄÖØÓÃÐÔ¡£ Ä£¿é½ÏΪ¼¯ÖУ¬¿ª·¢½ÏΪ¿ì½Ý£¬µ«²»Êʺϴó¹æģЭ×÷¿ª·¢¡£ Ä£¿é½ÏΪ¼¯ÖУ¬²¿Êð±È½Ï·½±ã£¬µ«Ò»¸öСµÄBUG¿ÉÄܻᵼÖÂÕû¸öÍøÕ¾µÄ̱»¾¡£ ·½°¸¶þ Ϊÿ¸öƵµÀ½¨Á¢Ò»¸öWeb Project¡£
ÿ¸öƵµÀµÄModel²¿¼þ¼È¿ÉÒÔ°üº¬ÓÚÏàÓ¦µÄWeb ProjectÖУ¬Ò²¿ÉÒÔ·Ö±ð·â×°³ÉClass Library¡£ ÿ¸öModel²¿¼þ¶¼Ó¦ÓÃÓÚÌض¨µÄƵµÀ£¬´úÂë·ÖÉ¢£¬ÖØÓÃÐԽϵ͡£ ¸÷Ä£¿é½Ï¶ÀÁ¢£¬Êʺϰ´ÕÕ¹¦ÄÜÄ£¿é·ÖÅäÈÎÎñµÄ¿ª·¢·½Ê½¡£ ¸÷Ä£¿é¶ÀÁ¢£¬²¿Êð¹¤×÷·Ç³£·±¸´£¬µ«ÓÉÓÚ¸÷ƵµÀÊÇËÉñîºÏµÄ(ÉõÖÁ¿ÉÒÔλÓÚ²»Í¬µÄ·þÎñÆ÷)£¬Ò»¸öƵµÀµÄ¹ÊÕϲ»»áÓ°Ïìµ½ÆäËûƵµÀµÄÕý³£ÔËÐС£ ·½°¸Èý Ϊÿ¸öƵµÀ½¨Á¢Ò»¸öWeb Project¡£
ËùÓÐƵµÀµÄModel²¿¼þ·â×°³ÉÒ»¸ö¹²ÓõÄClass Library¡£ ËùÓÐƵµÀ¹²ÓÃÒ»¸öModel²¿¼þ£¬´úÂë½ÏΪ¼¯ÖУ¬¾ßÓкܸߵ


Ïà¹ØÎĵµ£º

asp.net È·È϶Ի°¿òÓëÊý¾ÝÑéÖ¤¿Ø¼þµÄ³åÍ»ÎÊÌâ

 µ±Ò»¸öÍøÒ³ÖмÈÓÐÊý¾ÝÑéÖ¤¿Ø¼þ£¬ÓÖÓÐÒ»¸ö°´Å¥ÔÚµã»÷ʱ³öÏÖÌáʾ°´Å¥¡£
Èç¹ûÖ±½ÓÔÚÒ³ÃæµÄºǫ́´úÂëµÄPage_Loadº¯ÊýÖÐдÈëbtn.Attributes["Onclick"] = "return confirm('È·¶¨Òª±£´æÊý¾Ý£¿')"£¬ÄÇôÑéÖ¤¿Ø¼þ¾Í»áʧЧ£¬ÒòΪÑéÖ¤¿Ø¼þÒ²ÊÇͨ¹ýjsʵÏֵģ¬ÕâÑùµÄ»°return confirm('È·¶¨Òª±£´æÊý¾Ý£¿')ÏÈÓÚÔ­À´µÄjs´úÂëÖ´ÐУ¬Ì ......

ASP.NETºÍSQL SERVERÖÐʹÓÃÊÂÎñʾÀý

1£¬SqlServer´æ´¢¹ý³ÌµÄÊÂÎñ´¦Àí
Ò»ÖֱȽÏͨÓõijö´í´¦ÀíµÄģʽ´ó¸ÅÈçÏ£º
Create procdure prInsertProducts
(
 @intProductId int,
 @chvProductName varchar(30),
 @intProductCount int
)
AS
Declare @intErrorCode int
Select @intErrorCode=@@Error
Begin transaction
 if @intError ......

ASP.NETÒ³ÃæÖ¸Áî

ASP.NETÖ¸ÁîÔÚÿ¸öASP.NETÒ³ÃæÖж¼ÓС£Ê¹ÓÃÕâЩָÁî¿ÉÒÔ¿ØÖÆASP.NETÒ³ÃæµÄÐÐΪ¡£ÏÂÃæÊÇPageÖ¸ÁîµÄÒ»¸öÀý×Ó£º
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
    Inherits="_Default" %>
ÔÚASP.NETÒ³Ãæ»òÓû§¿Ø¼þÖÐÓÐ11¸öÖ¸Áî¡£ÎÞÂÛÒ³ÃæÊÇʹÓúǫ́±àÂëÄ£ÐÍ»¹ÊÇÄÚÖñ ......

ASP.NETµÄÍøÒ³´úÂëÄ£Ðͼ°ÉúÃüÖÜÆÚ

µÚ4Õ  ASP.NETµÄÍøÒ³´úÂëÄ£Ðͼ°ÉúÃüÖÜÆÚ
´Ó±¾Õ¿ªÊ¼£¬¾Í½øÈëÁËASP.NETÓ¦ÓóÌÐò¿ª·¢µÄÊÀ½ç¡£ÔÚÁ˽âÁËC#µÄ½á¹¹£¬ÒÔ¼°ÃæÏò¶ÔÏóµÄ¸ÅÄîºó£¬¾Í¿ÉÒÔ´ÓÃæÏò¶ÔÏóµÄ˼Ï뿪·¢ASP.NETÓ¦ÓóÌÐò¡£ÔÚASP.NETÖУ¬Äܹ»Ê¹ÓÃÃæÏò¶ÔÏóµÄ˼ÏëºÍÈí¼þ¿ª·¢ÖеÄһЩ˼Ï룬ÀýÈç·â×°¡¢ÅÉÉú¡¢¼Ì³ÐÒÔ¼°¸ß¼¶µÄÉè¼ÆģʽµÈ¡£±¾ÕÂÊ×ÏȽéÉÜASP.NETÖÐ×îÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ