asp.netÀﶯ̬ÉèÖÃmeta±êÇ©ÓÅ»¯
aspxÒ³Ãæ´úÂë
<head runat="server">
<%-- <title>ÈýÑ¸ÍøÂç</title>--%>
<asp:Literal ID="ltPageTitle" runat="server"/>
<asp:Literal ID="ltPagekeywords" runat="server" />
<asp:Literal ID="ltPagedescription" runat="server" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
csÒ³Ãæ´úÂë
string keywords = "ÈýÑ¸ÍøÂç,";
string description = "רעÓÚËÑË÷ÒýÇæÓÅ»¯(SEO)ºÍGoogleÓÅ»¯ÅÅÃûÑо¿£¬ÊÕ¼¯¹úÄÚÍâÍøÕ¾ÓÅ»¯×ÊÁÏ¡¢ËÑË÷ÒýÇæÓÅ»¯ÖªÊ¶¡¢ÍøÕ¾Íƹã²ßÂÔ¡¢GoogleÓÅ»¯ÖªÊ¶¡¢SEO¹¤¾ß£¬Ìá¹©ÍøÕ¾ÓÅ»¯ºÍGoogleÅÅÃûÓÅ»¯·þÎñ¡£";
ltPageTitle.Text = "\n<title>Ò³Ãæ±êÌâ</title>\n";
ltPagekeywords.Text = "<meta name=\"keywords\" content=\""+keywords+"\">\n";
ltPagedescription.Text ="<meta name=\"description\" content=\""+description+"\">\n";
Ïà¹ØÎĵµ£º
1.
±£Ö¤xp»·¾³ÒѾ°²×°ÓÐ.net framework 3.5 sp1¡¢asp.net mvc 1.0»ò2.0
2.
ÓÉÓÚiis5.1Ö»ÓÐÒ»¸öĬÈÏÍøÕ¾£¬Òò´ËÏȽ«Ä¬ÈÏÍøÕ¾µÄÆäËûÎļþ·Åµ½ÆäËûλÖ㬽«ÏîÄ¿Îļþ¿½±´µ½Ä¬ÈÏÍøÕ¾ËùÔÚĿ¼£¨Ò»°ãÊÇ£ºC:\Inetpub\wwwroot£©£¬ÐÞ¸ÄÏàÓ¦µÄÁ¬½Ó×Ö·û´®¡£
3. ......
1¡¢ÔÚcompilation Ï£¬ÇëÉèÖÃdebug=false £¬ÈçÏ£º
default Language="c#" debug="false">
2¡¢ÇëʹÓÃServer.Transfer´úÌæResponse.Redirect¡£
3¡¢Ê¹ÓÃValidator¿Ø¼þ£¬ÇëÒª¾³£¼ì²éPage.IsValid¡£
4¡¢ÇëʹÓÃforeachÑ»·£¬¶ø²»ÊÇΪ×Ö·û´®µü´úÑ»·¡£
5¡¢ÇëʹÓÿͻ§¶ËÑéÖ¤·½Ê½(²»ÒªÃ¿´Î¶¼ÔÚ·þÎñ¶ËÑéÖ¤)¡£
6¡¢ÎªÁ˱ÜÃâÖ ......
public static bool GetClientWeb()
{
bool result = false;
string clientType = string.Concat(HttpContext.Current.Request.UserAgent);
if (clientType.ToLower().Contains("mozilla") || clientType.ToLo ......