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

ASP.NET MVCСÂÛ

Ç°ÑÔ
      ASP.NET MVC×÷Ϊ΢Èí¹Ù·½µÄ.NETƽ̨ÏÂMVC½â¾ö·½°¸£¬×Ôµ®ÉúÆð¾ÍÎüÒýÁËÖÚ¶à.NETƽ̨¿ª·¢ÈËÔ±µÄÑÛÇò¡£ÔÚ¾­ÀúÁËÂþ³¤Previewºó£¬ÉϸöÔÂ΢ÈíÖÕÓÚ·¢²¼ÁËÆäbeta°æ¡£Ó¦¸Ã˵£¬Í¨¹ýÎÒÇ×Éíʵ¼ù£¬ÎÒÈÏΪÕâ¸ö¿ò¼ÜµÄÉè¼Æ»¹ÊÇÏ൱ÓÅÐãµÄ£¬ÖÁÉÙ´ÓÒ×ÓÃÐÔÀ´Ëµ£¬ASP.NET MVCÒªÓÅÓÚJavaƽ̨ÉϵÄStrutsºÍStruts2¡£Ê¹ÓÃStrutsʵÏÖMVCʱ£¬³ýÁËҪдһ¶ÑActionForm¡¢ActionºÍActionResultÍ⣬×îÍ·ÌÛµÄĪ¹ýдÓÚ¸÷ÖÖxmlÓ³ÉäÅäÖÃÎļþ¡£Struts2ËäÈ»²»ÓÃÔÙдActionForm£¬²¢ÇÒ½µµÍÁËÇÖÈë¶È£¨ÆäʵStruts2ºÍStruts¹Øϵ²»´ó£¬¶ø»ù±¾¿ÉÒÔÈÏΪÊÇWebWorkµÄºóÐø°æ±¾£©£¬µ«ÊÇÈÔÎÞ·¨±ÜÃâxmlÅäÖÃÎļþ¡£
      ASP.NET MVC´ÓÒ»¿ªÊ¼µÄÉè¼Æ˼·¾ÍÓëStruts²»Í¬£¬ËüµÄÓ³ÉäÊÇÀûÓ÷ÓÉÅäÖöø·Çxml£¬´Ó¶ø´ó´ó½µµÍÁË¿ª·¢¸´ÔӶȣ¬²¢ÇÒ±ÈStrutsÒª¸üÖ±¹Û£¬¸üÈÝÒ×ÉÏÊÖ¡£
      ¿ÉÊÇ£¬Õâ²¢²»±íÃ÷ASP.NET MVC¾ÍÊǾ¡Éƾ¡ÃÀµÄ¡£ÔÚÎÒʵ¼ùµÄ¹ý³ÌÖУ¬·¢ÏÖijЩµØ·½Ê¹ÓÃÆðÀ´»¹ÊDz»Ì«·½±ã£¬ÔÚÕâÀïССÂÛÊöһϡ£²»Í×Ö®´¦£¬»¹Çë¸÷λ¾¡ÇéÅúÆÀ¡£
±ðŤµÄÊÓͼ£ºÄܲ»Äܲ»ÒªÈÃÎҳе£Âß¼­
      ÎÒ¸öÈËÈÏΪ£¬ASP.NET MVCµÚÒ»¸ö²»Ì«Í×µ±µÄµØ·½¾ÍÊÇÊÓͼµÄʵÏÖ¡£ÔÚÕâ¸ö¿ò¼ÜÖУ¬ÊÓͼÊÇʹÓÃASPXÎļþʵÏֵġ£¾Í³ÊÏÖÊý¾ÝÕâÒ»ÐèÇóÀ´Ëµ£¬ASP.NET MVCÏÂÒ»°ãÐÔµÄ×ö·¨ÊÇ£º¿ØÖÆÆ÷¸ºÔðµ÷ÓÃModelÍê³ÉÊý¾ÝµÄ¶ÁÈ¡£¬²¢½«ÐèÒª³ÊÏÖµÄÊý¾Ýͨ¹ýViewData´«µÝ¸øÊÓͼ£¬²¢Ñ¡ÔñijÊÓͼ³ÊÏÖ¡£±»Ñ¡ÖеÄÊÓͼҪ¸ºÔð½«ViewDataÖÐÏàÓ¦µÄÊý¾Ý¶ÁÈ¡¡¢·Ö½â£¬È»ºóʹÓÃÒ»¶¨µÄÂß¼­Óï¾ä½«Æä³ÊÏÖ¡£
      Õâ¸ö·½Ê½£¬¾ÍÒªÇóÊÓͼÖдæÔÚÒ»¶¨µÄÂß¼­Óï¾ä£¬È罫ViewDataÖÐÊý¾Ýת»»³ÉÏàÓ¦ÀàÐ͵ÄÀàÐÍת»»Óï¾ä£»Èç¹ûÐèÒª°´ÕÕijһÌõ¼þ³ÊÏÖ²»Í¬ÄÚÈÝ£¬ÔòÐèÒª·ÖÖ§Óï¾ä£»¶ø³£Óõıí¸ñʽÊý¾Ý³ÊÏÖÐèÒªÓõ½Ñ­»·Óï¾ä¡£ÓÚÊÇ£¬ÎÒÃǾͻῴµ½ÊÓͼÖгä³âן÷ÖÖ<%%>¡¢if¡¢foreachµÈµÈµÄ¶«Î÷¡£
      µ±È»£¬ÎÒ²»·ñÈÏ£¬Á¼ºÃµÄ±àд¿ÉÒÔÈÃÕâЩ´úÂëÕû½àµÄ³öÏÖÔÚÊÓͼÖС£È»¶ø£¬ÔÚÎÒµÄÐÄÄ¿ÖУ¬Ò»¸öÁ¼ºÃ»ùÓÚWebÓ¦ÓõÄMVC¿ò¼ÜÉè¼Æ£¬ÆäÊÓͼÊDz»Ó¦¸Ã´æÔÚÈκοÉÖ´ÐдúÂëµÄ£¬¶øÓ¦¸ÃÊÇÒ»¸öµ¥´¿µÄÄ£°åÎļþ£¬»òÕß˵º¬ÓпÉÌæ»»±êÇ©µÄÒ³ÃæÎļþ£¬¾ÍÏñPHPƽ̨ϵÄSmartyÄÇÑù¡£ÖÁÓÚÊÓͼÖÐÏàÓ¦µÄ¿ÉÌæ»»±êÇ©Ìæ»»³ÉʲôÄÚÈÝ£¬Ó¦¸ÃÊÇ¿ØÖÆÆ÷µÄÔðÈΡ£Éè¼ÆÒ»Ì×Á¼ºÃµÄ±êÇ©Ä£°å£¬¶ÔÊý¾Ý¡¢·ÖÖ§¡¢Ñ­»·µÈ³£¼ûÈÎÎñÉèÖÃÏàÓ¦±êÇ©£¬ÎÒÈÏΪÊǸüÊʺÏASP.NET


Ïà¹ØÎĵµ£º

ASP.NET·ÀºóÍË

ÈçÓÐÒ³ÃæAdmin£¬ÔòÔÚÆäcsÎļþÖÐдÈçÏ´úÂ룺
protected void Page_Load(object sender, EventArgs e)
{
Response.AddHeader("Cache-Control", "no-cache");
Response.Expires = -1;
Response.Cache.SetNoStore();
Response.AddHeader("Pragma", "no-cache");
Response ......

asp.net È¡µÃÓû§¿Ø¼þÀïµÄÊôÐÔ»ò¿Ø¼þ

×î½üÔÚÓÃÓû§¿Ø¼þʱ£¬ÒýÓû§¿Ø¼þµÄÒ³ÃæÓÐʱºò»áºÍÓû§¿Ø¼þ½øÐÐÊý¾ÝµÄ½»»¥£¬ÍøÉϺÃÏñºÜ¶àÈ˲»ÖªµÀºÎ»ñÈ¡
д¸öÀý×Ó˵Ã÷Ò»ÏÂ
 
È¡µÃÓû§¿Ø¼þÀïÃæµÄ¿Ø¼þ²¢½øÐи³Öµ
Óû§¿Ø¼þaspxÒ³´úÂë
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="HeadPanel.ascx.cs" Inherits="HeadPanel" %>
  & ......

ASP.NET MVCÓëWebFormÇø±ð

[תÌùÒ»]
ʹÓÃASP.NET MVC¿ò¼Ü£¬´´½¨Ä¬ÈÏÏîÄ¿£¬µÚÒ»Ö±¹Û¸Ð¾õ¾ÍÊǵØÖ·¶¼ÊÇRewrite¹ýµÄ¡£¶ÔÔ´ÂëºÍÅäÖÃÎļþÉÔ¼Ó·ÖÎö²»ÄÑ¿´³ö£¬MVCʹÓÃÁËhttpModulesÀ´À¹½ØµØÖ·ÇëÇ󣬾ßÌåÓõ½ÁËSystem.Web.RoutingÀà¿â£¨MVC2ÖУ¬MVC1ÔõôÓõÄÍü¼ÇÁË¡££©¶øÕⲿ·ÖÀà¿â±»°ü×°ÔÚ.NET Framework3.5 SP1ÖУ¬MVC2ÐèÒªSP1Ö§³ÖÒ²¾ÍÀíËùµ±È»ÁË¡£SP1Ìṩµ ......

[·­Òë]ASP.NET MVC

ÔÚ½ñÌ죬MVC(Model-View-Controller)Éè¼ÆģʽÓë²âÊÔÇý¶¯¿ª·¢·½·¨(Test-Driven Development ¼ò³ÆTDD)±»¹ã·ºÓ¦ÓÃÓÚÆóÒµ¼¶WEBÓ¦ÓõĿª·¢ÖС£MVCÉè¼ÆģʽǿÖÆÎÒÃǽ«Ó¦Ó÷ֽâ³ÉÈý¸ö²¿·Ö£ºÄ£ÐÍ(Model)¸ºÔðÒµÎñÊý¾ÝµÄ´æ´¢¼°¹ÜÀí£¬ÊÓͼ(View)¸ºÔð³ÊÏÖÊý¾Ý£¬²¢ÎªÓû§ÌṩÓëϵͳ½»»¥µÄ½çÃæ½Ó¿Ú£¬¶ø¿ØÖÆÆ÷(Controller)Ôò¸ºÔð½«Óû§¶¯×÷ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ