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

Æô¶¯asp.netÒ³Ã滺´æ£¨¼Ó¿ìÒ³Ãæ·ÃÎÊËٶȣ©

 Æô¶¯Ò³Ã滺´æ£¬´úÂëÈçÏ£º
<%OutputCache Duration="60" VaryByParam="*"%>
 ËµÃ÷£º
Duration±ØÐèÊôÐÔ¡£Ò³Ãæ±»»º´æºµ£¬ÒÔÃëΪµ¥Î»£¬ÇÒ±ØÐëÊÇÕûÊý¡£
Location Ö¸¶¨Ó¦Êä³ö½øÐлº´æµÄλÖᣲÎÊýÊÇÒÔÏÂÑ¡ÏîÖ®Ò»£ºAny,Client,Downstream,None,Server,ServerAndClient
VaryByParam ±ØÐèÊôÐÔ¡£RequestÖбäÁ¿µÄÃû³Æ£¬ÕâЩ±äÁ¿ÃûÓ¦¸Ã²úÉúµ¥¶ÀµÄ»º´æÌõÄ¿¡£“none”±íʾûÓб䶯¡£“*”¿ÉÓÃÓÚΪÿ¸ö²»Í¬µÄ±äÁ¿Êý×é´´½¨ÐµĻº´æÌõÄ¿¡£±äÁ¿Ö®¼äÓÓ£»”½øÐзָô¡£
VaryByHeader»ùÓÚÖ¸¶¨µÄÖеı䶯¸Ä±ä»º´æÌõÄ¿¡£
VaryByCustomÔÊÐíÔÚglobal.asaxÖÐÖ¸¶¨×Ô¶¨Òå±ä¶¯£¨Àý£º“Browser”£©
²úƷĿ¼ÔÊÐíÓû§»ùÓÚcategoryIDºÍÒ³±äÁ¿²é¿´Ä¿Â¼Ò³£¬¿ÉÒÔÓÃVaryByParam="categoryID;page",  ½«²úƷĿ¼»º´æÒ»¶Îʱ¼ä£¨Èç¹û²úÆ·²»ÊÇËæʱ¶¼Ôڸı䣬һСʱ»¹ÊÇ¿ÉÒÔ½ÓÊܵģ¬Òò´Ë£¬³ÖÐøʱ¼äÊÇ3600Ã룩¡£Õ⽫Ϊÿ¸öÖÖÀàµÄÿ¸öĿ¼ҳ´´½¨µ¥¶ÀµÄ»º´æÌõÄ¿¡£Ã¿¸öÌõÄ¿´ÓÆäµÚÒ»¸öÇëÇóËãÆð½«Î¬³ÖÒ»¸öСʱ¡£
 
VaryByHeader ºÍVaryByCustomÖ÷ÒªÓÃÓÚ¸ù¾Ý·ÃÎÊÒ³ÃæµÄ¿Í»§¶Ë¶ÔÒ³ÃæµÄÍâ¹Û»òÄÚÈݽøÐÐ×Ô¶¨Ò塣ͬһ¸öURL¿ÉÄÜÐèҪͬʱΪä¯ÀÀÆ÷ºÍÒƶ¯µç»°¿Í»§¶Ë³ÊÏÖÊä³ö£¬Òò´Ë£¬ÐèÒªÕë¶Ô²»Í¬µÄ¿Í»§¶Ë»º´æ²»Í¬µÄÄÚÈÝ°æ±¾¡£»òÕߣ¬Ò³ÃæÓпÉÄÜÒѾ­Õë¶ÔIE½øÐÐÁËÓÅ»¯£¬Õë¶ÔNetscape»òOperaÔòӦȡÏûÕâÖÖÓÅ»¯¹¦ÄÜ¡£ºóÒ»¸öÀý×ӷdz£Æձ飬ÎÒÃǽ«Ìṩһ¸ö˵Ã÷ÈçºÎʵÏÖ´ËÄ¿±êµÄʾÀý£º
ʾÀý£ºVaryByCustomÓÃÓÚÖ§³Öä¯ÀÀÆ÷×Ô¶¨Òå
ΪÁËʹÿ¸öä¯ÀÀÆ÷¶¼¾ßÓе¥¶ÀµÄ»º´æÌõÄ¿£¬VaryByCustomµÄÖµ¿ÉÒÔÉèÖÃΪ“browser”¡£´Ë¹¦ÄÜÒѾ­ÄÚÖÃÔÚ»º´æÄ£¿éÖУ¬²¢ÇÒ½«Õë¶Ôÿ¸öä¯ÀÀÆ÷Ãû³ÆºÍÖ÷Òª°æ±¾²åÈëµ¥¶ÀµÄÒ³Ã滺´æ°æ±¾¡£
£¼%@ OutputCache Duration="60" VaryByParam="None" VaryByCustom="browser"%£¾


Ïà¹ØÎĵµ£º

asp.netÖÐʱ¼ä¸ñʽ»¯µÄ¼¸ÖÖ·½·¨

Çмǣ¬ÇÐ¼Ç DateTime.Now.Date.ToString("yyyyÄêMMÔÂddÈÕ"); //MM Òª´óд£¬·ñÔò»áÊÇ00,²»ÊÇÕæʵµÄÔÂ·Ý private void getDate()
{
date.Text = DateTime.Now.Date.ToString("yyyyÄêMMÔÂddÈÕ"); //Õâ¸öËæÒâµÄ£ºyyyy-MM-dd Ò²¿ÉÒÔ
string Temp="";
switch (DateTime.Now.DayOfWeek)
{
case DayO ......

ASP PHP ASP.net Éú³É¾²Ì¬Ò³ÃæµÄ·½·¨


Ëæ ×ÅÍøÕ¾·ÃÎÊÁ¿µÄ¼Ó´ó£¬Ã¿´Î´ÓÊý¾Ý¿â¶ÁÈ¡¶¼ÊÇÒÔЧÂÊ×÷Ϊ´ú¼ÛµÄ£¬ºÜ¶àÓÃACCESS×÷Êý¾Ý¿âµÄ¸ü»áÉîÓÐÌå»á£¬¾²Ì¬Ò³¼ÓÔÚËÑË÷ʱ£¬Ò²»á±»ÓÅÏÈ¿¼ÂÇ¡£»¥ÁªÍøÉÏÁ÷ ÐеÄ×ö·¨Êǽ«Êý¾ÝÔ´´úÂëдÈëÊý¾Ý¿âÔÙ´ÓÊý¾Ý¿â¶ÁÈ¡Éú³É¾²Ì¬Ã棬ÕâÑùÎÞÐμä¾Í¼Ó´óÁËÊý¾Ý¿â¡£½«ÏÖÓеÄASPÒ³Ö±½ÓÉú³É¾²Ì¬Ò³£¬½«»á½ÚÊ¡ºÜ¶à¡£
ÏÂÃæµÄÀý×ÓÊǽ«¡¢index.asp?i ......

ASP.NETÈý²ã¼Ü¹¹µÄ˵Ã÷¼°Èý²ã¼Ü¹¹µÄÌصã

ASP.NETÈý²ã½á¹¹ËµÃ÷
ÍêÉƵÄÈý²ã½á¹¹µÄÒªÇóÊÇ:Ð޸ıíÏÖ²ã¶ø²»ÓÃÐÞ¸ÄÂß¼­²ã,ÐÞ¸ÄÂß¼­²ã¶ø²»ÓÃÐÞ¸ÄÊý¾Ý²ã¡£·ñÔòÄãµÄÓ¦ÓÃÊDz»ÊǶà²ã½á¹¹,»òÕß˵ÊDzã½á¹¹µÄ»®·ÖºÍ×éÖ¯ÉÏÊDz»ÊÇÓÐÎÊÌâ¾ÍºÜÄÑ˵.²»Í¬µÄÓ¦ÓÃÓв»Í¬µÄÀí½â£¬ÕâÖ»ÊÇÒ»¸ö¸ÅÄîµÄÎÊÌ⣮
Àí½âASP.NETÈý²ã½á¹¹——ΪʲôҪ·ÖÈý²ã£¿
ÎÒÃÇÓÃÈý²ã½á¹¹Ö÷ÒªÊÇÊ¹Ï ......

ASP.NET³£ÓôúÂë

1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
 
´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attribut ......

asp.net Ç°ºǫ́³ÌÐòдµ½Ò»Æð

 <%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace ="System.Text" %>
<%@ Import Namespace="System.Data" %>
<%
    
    for (int i = 0; i <= 10; i++)
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ