ASP.net 4.0 Õë¶ÔSEOµÄ¸Ä½ø
ËÑË÷ÒýÇæÓÅ»¯¶ÔÈκÎÃæÏò¹«ÖÚµÄÍøÕ¾À´Ëµ¶¼·Ç³£ÖØÒª£¬ASP.net 4.0 Ϊ´Ë¾Í×öÁË´óÁ¿¸ÄÔì¡£ÕâЩ¸Ä½ø°üÀ¨ÈçÏ£º 301ÓÀ¾ÃÐÔÖض¨Ïò Ëæ×Åʱ¼äµÄǨÒÆ£¬ÍøÕ¾µÄһЩҳÃæµØÖ·»á·¢Éú±ä»¯£¬Õâ»áµ¼ÖÂËÑË÷ÒýÇæÊÕ¼µÄÁ´½ÓµØÖ·¡¢Óû§ÊղصĵØַʧЧ¡£Response.Redirect() ¾ÍÊǽâ¾öÕâ¸öÎÊÌâµÄ¡£µ«ÊÇResponse.Redirect ÓÐÒÔÏÂÎÊÌ⣺ Response.Redirect()·½·¨²úÉúµÄÊǸö HTTP 302 Ìøת£¬ÔÚÓû§³¢ÊÔ·ÃÎÊÀϵÄURLʱ£¬»áµ¼Ö¶àÓàµÄHTTPÍù·µ¡£ÁíÍâËÑË÷ÒýÇæÒ»°ã²»»á¸úËæ¶à¸öÌøת£¬ÕâÒâζ×ÅʹÓÃÒ»¸öÁÙʱתÏò»á¸ºÃæÓ°ÏìÄãµÄÍøÒ³ÅÅÃû¡£ ÎÒ֮ǰд¹ý²©¿Í£¬½éÉÜÈçºÎʵÏÖ301Ìøת£¬¡°´ÓHTTP״̬ 301£¬302£¬200 À´¿´Ò³ÃæÌøת¡± ÄÇʱºòʵÏÖ 301 Ìøת±È½ÏÂé·³£¬ASP.net 4.0 Ϊ´ËרÃÅÔö¼ÓÁËResponse.RedirectPermanent() ·½·¨ÓÃÀ´½â¾öÕâ¸öÎÊÌâ¡£ ¼òµ¥À´Ëµ£¬ÈçϱíËùʾ£º HTTP״̬ ½âÊÍ ³ÌÐò´úÂë 301 301 ´ú±íÓÀ¾ÃÐÔתÒÆ(Permanently Moved)
¼´ÓÀ¾ÃÐÔÖض¨Ïò Response.RedirectPermanent("test_2.aspx"); 302 302 ´ú±íÔÝʱÐÔתÒÆ(Temporarily Moved ) Response.Redirect("test_2.aspx"); MVC ÖÐÒ²ÓÐÀàËƵĴúÂ룺Response.RedirectToRoute(string routeName) ºÍ Response.RedirectToRoutePermanent(string routeName) Head ÖÐµÄ keywords ºÍ description ÓÉÓÚËÑË÷ÒýÇæÓÅ»¯×÷±×µÄÔÒò£¬ÏÖÔÚËÑË÷ÒýÇæÕýÔÚµ»¯ÕâÁ½¸ö¹Ø¼ü×ֵIJο¼×÷ÓᣱÈÈçÕâƪ²©¿Í£º¡°KeywordsºÍDescription--SEO¸ßÊÖΪʲô²»Óá± ¾ÍÃèÊöÁËÔÒò¡£µ«ÊÇÈç¹û¿ÉÒÔ£¬½¨Ò黹ÊÇÉèÖÃÕâÁ½¸ö¹Ø¼ü×Ö£¬ASP.net 4.0 ÖÐΪ·½±ãÉèÖÃÕâÁ½¸ö¹Ø¼ü×ÖרÃÅ×öÁËÓÅ»¯£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÏÂÃæ¼òµ¥¼¸ÐдúÂë¾Í¿ÉÒÔÍê³É¶¯Ì¬ÉèÖ㺠protected void Page_Load(object sender, EventArgs e)
{
Page.Title = "²âÊÔ±êÌâ";
Page.MetaKeywords = "²âÊԹؼü×Ö";
Page.MetaDescription = "²âÊÔ¼ò½é";
}
»òÕßÔÚASPX ÎļþÖÐÈçÏÂд£º
ScottÄǸöÀý×Ó¹À¼ÆÊǸüÔç²âÊÔ°æ±¾µÄ£¬ÄÇʱºòÊÇ Keywords £¬ Description £¬¶ø²»ÊÇ MetaKeywords ºÍ MetaDescription¡£
ASP.NET Web FormsÒ²Ö§³ÖÁËURLµ¼Ïò
¼ò½à¡¢Ö±¹ÛµÄURL£¬ËÑË÷ÒýÇæϲ»¶£¬Óû§Ò²Ï²»¶¡£ÔÚASP.NET 4.0ÖУ¬URL Routing¼È¿ÉÒÔÓ³Éäµ½ASP.NET MVC¿ØÖÆÆ÷À࣬Ҳ¿ÉÓ³Éäµ½»ùÓÚASP.NET Web FormsµÄÍøÒ³¡£
ÄãÉõÖÁ¿ÉÒÔÔÚÒ»¸öÏîÄ¿ÖУ¬»ìºÏʹÓú¬ÓÐ Web Forms ºÍ MVC¿ØÖÆÆ÷£¬¼´£ºÊ¹Óõ¥Ò»Ò»
Ïà¹ØÎĵµ£º
·þÎñÆ÷¶Ë½Å±¾¿é£º
<script runat="server">
int my = 10;
</script>
·ÖÉ¢µÄ½Å±¾
<%= my.ToString() %>
<% Response.Write(my); %>
.aspxÎļþµÄÄÚÈݱ»½âÎöÎ ......
ASP.NETÒ³ÃæÓëIISµ×²ã½»»¥ºÍ¹¤×÷ÔÀíÏê½â
µÚÒ»»Ø£º
ÒýÑÔ
ÎÒ²éÔĹý²»ÉÙAsp.NetµÄÊé¼®£¬·¢ÏÖ´ó¶àÊý×÷Õ߶¼ÊÇÕ¾ÔÚÒ»¸ö±È½Ï¸ßµÄ²ã´ÎÉϽ²½âAsp.Net¡£ËûÃÇÄÍÐÄ¡¢Ï¸ÖµظæËßÄãÈçºÎÒ»²½²½ÍϷſؼþ¡¢ÉèÖÿؼþÊôÐÔ¡¢±àдCodeBehind´úÂ룬ÒÔʵÏÖij¸öÌض¨µÄ¹¦ÄÜ¡£
ÕâÖÖ×ö·¨£¬Êµ¼ÊÉÏÊǻشðÁË“ÈçºÎÈ¥×ö”µÄÎÊÌ⣬ȴà ......
΢ÈíÒѾÐû²¼ASP.NET MVC 2µÄ´úÂëÒÔMS-PLÐÒé·¢²¼,MS-PLÊÇÒ»¸öµÃµ½OSIÈÏÖ¤µÄ¿ªÔ´ÐÒ飬ASP.NET MVC»ùÓÚMS-PL·¢²¼£¬ÊÇÒ»¸öÕæÕýµÄ¿ªÔ´¿ò¼ÜÇÒûÓÐÈκÎƽ̨ÏÞÖÆ£¬Ò²¾ÍÊÇ˵£¬Äú¿ÉÒÔÔÚmonoÏÂʹÓûò¿ª·¢ASP.NET MVCµÄÏà¹ØÏîÄ¿¡£ ¿ÉÒÔµ½ASP.NET MVC 2 RTM Download Details page»ñÈ¡Ô´´úÂë,»òÕßµ½CodePlexÉÏ»ñÈ¡£¬Õâ¸öÒ³ÃæÊÇ΢Èí¹Ù ......
ҪʵÏÖa¿Ø¼þ¿Ø¼þ´¥·¢b¿Ø¼þ·þÎñÆ÷¶Ëʼþ£¬Ðè¸øa¿Ø¼þÌí¼Ójs½Å±¾£¬ÒÔb¿Ø¼þÃûÒåÌá½»Ò³Ã棬¾ßÌå´úÂ룺
var theForm = document.forms['form1'];
theForm.__EVENTTARGET.value = "b"; //´¥·¢b¿Ø¼þ·þÎñÆ÷¶Ë·½·¨
theForm.__EVENTARGUMENT.value = "a trigger";//´«µÝµÄ²ÎÊý
theForm.submit();
×¢Ò⣺ÐèÒªÉèÖÃÒ³ÃæÊôÐÔÖÐµÄ enab ......