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

¶¨ÖÆASP.Net MVCµÄ´úÂëÄ£°å

ÔÚASP.Net MVCÀàÐ͵ÄÏîÄ¿ÖÐÓÒ»÷Controller Îļþ¼Ð£¬Ñ¡ÖÐAdd=>Controller¡­ºó£¬»áÔÚн¨µÄController ÖвåÈëһЩĬÈÏ´úÂë¡£   ÔÚController µÄ¸÷¸öAction·½·¨ÖÐÓÒ»÷ Add View¡­£¬Ò²»áÔÚн¨µÄViewÖвåÈëһЩ´úÂë¡£ÔÚн¨Viewʱ²åÈëµÄ´úÂë»á¸ù¾ÝÉÏÏÂÎĺÍÄãµÄÑ¡Ôñ¶ø²»Í¬£¬ËƺõÓкܴóµÄ´úÂëÉú³É¹¦ÄÜ¡£ ÉÏÊöÁ½ÕßÉú³É´úÂëʱ¶¼Óõ½ÁËVisual StudioµÄ T4 ´úÂëÉú³ÉÄ£°å£¬T4Ä£°åºÍCodesmithÄ£°åµÄÔ­Àí²î²»¶à¡£T4Ä£°åÉú³É´úÂ빦ÄÜÔç¾ÍÔÚVSÖÐÓÐÁË£¬Ö»ÊǺÜÉÙΪÈËËùÖª£¬ÕæÊÇVSµÄÒ»ÏîÒþ²Ø¹¦ÄÜ¡£ÒÔÉÏÁ½ÏÄÜʹÓõÄÄ£°å¶¼ÔÚC:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC\CodeTemplates Ŀ¼Ï¡£ ½«CodeTemplatesµÄÕû¸öĿ¼¸´ÖƳöÀ´·ÅÈëÏîÄ¿Ï¡£   ÎÒÃÇ¿ÉÒÔÐÞ¸ÄÕâÀïµÄÄ£°å£¬Ò²¿ÉÒÔÌí¼Ó×Ô¼ºµÄÄ£°å£¬ÔÚÌí¼Ó´úÂëʱ¿ÉÒÔÑ¡ÔñÄĸöÄ£°å¡£ÕâÑù¾ÍʵÏÖÁ˶¨ÖÆASP.Net MVCµÄ´úÂëÄ£°å¡£


Ïà¹ØÎĵµ£º

ASP.NETÎļþÏÂÔغ¯ÊýʹÓÃ

 ASP.NETÎļþÏÂÔغ¯ÊýʹÓÃÊÇʲôÇé¿öÄØ£¿ÔÚÄãµÄPage_LoadÖÐÌí¼ÓÕâÑùµÄ´úÂë:
Page.Response.Clear();
bool success = ResponseFile(Page.Request, Page.Response, "Ä¿µÄÎļþÃû³Æ", @"Ô´Îļþ·¾¶", 1024000);
if (!success) Response.Write("ÏÂÔØÎļþ³ö´í£¡"); Page.Response.End();
ASP.NETÎļþÏÂÔغ¯Êý´úÂëΪ: ......

ASP.NET MVC ÈëÃÅ

ʲôÊÇMVCģʽ
MVC£¨Model-View-Controller£¬Ä£ÐÍ—ÊÓͼ—¿ØÖÆÆ÷ģʽ£©ÓÃÓÚ±íʾһÖÖÈí¼þ¼Ü¹¹Ä£Ê½¡£Ëü°ÑÈí¼þϵͳ·ÖΪÈý¸ö»ù±¾²¿·Ö£ºÄ£ÐÍ£¨Model£©£¬ÊÓͼ£¨View£©ºÍ¿ØÖÆÆ÷£¨Controller£©¡£
ÄÇôMVCģʽºÍÎÒÃÇÊìϤµÄWebFormģʽÓÐʲô²»Í¬ÄØ£¿ËûµÄ¸÷¸ö²¿·ÖÓÖÊÇÔõÑù·Ö¹¤µÄÄØ£¿
ÎÒÃÇÏÈÀ´¿´Ò»ÏÂÆÕͨµÄWebFormģʽÏ£ ......

ASP.NET ÏÂweb.config FormsÉí·ÝÑéÖ¤µÄÅäÖÃ

 ÔÚwebconfigÖÐÓÐÒ»¸öÖØÒª½Úµã <system.web> ÆäÖаüÀ¨ÁËÒ»¸öÉí·ÝÑéÖ¤ÅäÖýڵã
<authentication mode="Windows"/>
ÆäÖÐ authentication ÊǽڵãÃû£¬modeÊÇģʽ£¬ÉÏÊö´úÂë±íʾ ²ÉÓÃwindowsÉí·ÝÑéÖ¤£¬ÄÇô´ËʱÉí·ÝÑéÖ¤½«½»¸øiis´¦Àí£¬¶øiisÖÐĬÈÏÉè
  <authentication mode="Forms" >
 &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ