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

Asp.NetʹÓÃCache ÐÄÓêÖ®¼Ò

Cache ¼´¸ßËÙ»º´æ £¬ÎÒÏëºÜ¶àÈ˶ÔËûµÄµÚÒ»Ó¡ÏóÒ»¶¨ÏñÎÒÒ»Ñù£¬¸Ð¾õËûÒ»¶¨ÄÜÌá¸ßϵͳµÃÐÔÄܺÍÔËÐÐËٶȡ£µÄÈ·¡£NetÍƳöcacheµÄ³õÖÔȷʵÊÇÕâÑùµÄ¡£ÄÇôcacheÊÇÈçºÎÌá¸ßϵͳÐÔÄÜÓëÔËÐÐËÙ¶ÈÄØ£¿ÊDz»ÊÇÔÚÈκÎÇé¿öÏÂÓÃcache¶¼ÄÜÌá¸ßÐÔÄÜ£¿ÊDz»ÊÇcacheÓõÄÔ½¶à¾ÍÔ½ºÃÄØ£¿ÎÒÔÚ½üÆÚ¿ª·¢µÄÏîÄ¿ÖÐÓÐËùÌå»á£¬Ð´ÏÂÀ´µ±×÷×ܽáҲϣÍûÄܸú´ó¼ÒÒ»Æð̽ÌÖ̽ÌÖ£¬ÓдíÎóµÄµØ·½Ï£Íû´ó¼ÒÅúÆÀÖ¸Õý¡£
1.       Cache ÊÇÈçºÎ¹¤×÷µÄ¡£
l         Cache ÊÇ·ÖÅäÔÚ·þÎñÆ÷ÉϵÄÒ»¸ö¹«¹²µÄÄÚ´æƬ¡£
Ëùν¹«¹²Ö¸µÄcacheÖ»ÒªÒ»´´½¨ÊÇÈκÎÒ»¸ö¿Í»§¶Ëä¯ÀÀÆ÷¶¼¿ÉÒÔͨ¹ýºǫ́´úÂë·ÃÎʵ½Ëü£¬ËüÃæÏòµÄÊÇËùÓÐÓû§£¬Ïà¶Ô¶øÑÔsessionÒ²ÊÇ·þÎñÆ÷ÉϵÄÒ»¶ÎÄڴ棬µ«ËûÃæÏòµÄÊǵ¥¸öÓû§¡£ËüÊÇ·þÎñÆ÷µÄÒ»¶ÎÄÚ´æ¿é£¬Ò²¾ÍÊÇ˵ÿ¸öcacheÒ»¾­´´½¨¾ÍÕ¼ÓÃÁË·þÎñÆ÷×ÊÔ´µÄ¡£ËùÒÔ´ÓÕâµãÀ´ËµÎÒÃǾͿÉÒÔ˵£º²¢²»ÊÇcacheÔ½¶àÔ½ºÃ¡£
l         cache ÊÇÓÐʱ¼äÏÞÖƵģ¬³¬¹ýÁË·þÎñÆ÷É趨µÄ¹ýÆÚʱ¼ä£¬Ëü¾Í»á±»·þÎñÆ÷»ØÊÕ¡£
l         c.cache ¿ÉÒÔ´æ·ÅÈκζÔÏó
2.       Cache ÈçºÎ´´½¨ÒÔ¼°ÈçºÎÏú»Ù¡£
l         ´´½¨cache
ÔÚ¡£Net»·¾³ÏÂͨ¹ýCache.Insert(string key,object o)·½·¨´´½¨¡£ÆäÖÐkey ´ú±ícacheµÄID,o´ú±í´æµ½cacheÀïµÄ¶ÔÏó¡£
l         Ïú»Ùcache.
ͨ¹ý·½·¨Cache.Remove(string key)ÆäÖÐkey ´ú±ícacheµÄ ID.
l         µ÷ÓÃcache.
CacheÖ§³Ö×°Ïä/²ðÏä²Ù×÷¡£ÈçÄã¿ÉÒÔ°ÑÒ»¸öDataSet¶ÔÏódsͨ¹ýCache.Insert(“dsCache”,ds)µÄ·½Ê½´æµ½CacheÖУ¬¿ÉÒÔͨ¹ý²ðÏä²Ù×÷ DataSet ds = (DataSet)Cache[“dsCache”]À´·ÃÎÊËü¡£
3.       ʲôʱºòÓÃcache.
Cache Ò»°ãÓÃÓÚÊý¾Ý½Ï¹Ì¶¨£¬ÓõĽÏƵ·±µÄµØ·½¡£ÀýÈç¿ÉÒ԰ѽøÏú´æϵͳÖпÉÒ԰ѲúÆ·ÐÅÏ¢´æÈëcache,ÔÚÓû§µ÷ÓòúÆ·ÐÅϢʱͨ¹ýµ÷ÓÃcache¼´¿É£¬ÕâÑù´ÓºÜ´ó³Ì¶ÈÉϼõÉÙÁËÓû§ÓëÊý¾Ý¿âµÄ½»»¥£¬Ìá¸ßÁËϵͳµÄÐÔÄÜ¡£·´Ö®£¬cache²»ÊʺÏÓÃÔÚÊý¾Ý±ä¶¯¿ì£¬Ê¹Ó÷¶Î§ºÜÕ­µÄµØ·½¡£ÀýÈç°ÑÒ»¸ö¾ßÌå²É¹ºµ¥´æÈë cacheÖС£
4.       cache µ÷ÓÃ×¢ÒâÊÂÏî¡£
CacheÊÇÓÐʱ¼


Ïà¹ØÎĵµ£º

ASP.NETÖжà¹úÓïÑÔµÄʵÏÖ

ASP.NETÖжà¹úÓïÑÔµÄʵÏÖ
http://www.cnblogs.com/firstyi/archive/2008/03/13/1103970.html
ASP.NET»º´æÌá¸ßÕ¾µãÐÔÄÜ
http://www.cnblogs.com/firstyi/archive/2007/08/15/856676.html
¿Í»§¶Ë½Å±¾¹ÜÀí
http://www.cnblogs.com/firstyi/archive/2006/11/13/559049.html ......

asp.net ±¸·Ý»¹Ô­Êý¾Ý¿â


1£º¿Í»§¶Ë
<table border="0" style="width: 60%">
¡¡¡¡<tr><td colspan="2" style="height: 5px">
      Êý¾Ý¿â»¹Ô­ºÍ±¸·Ý:</td></tr>
¡¡¡¡<tr><td style="width: 171px; height: 23px;">
      ÇëÑ¡ÔñÊý¾Ý¿â:</t ......

Asp.netÖÐ×Ô¶¨Òå¿Ø¼þÒýÓÃjavascriptÖеÄÈÕÀú½Å±¾ÐĵÃ


×Ô¶¨Òå¿Ø¼þÖеÄÒ³Ãæ´úÂ룺
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="wcontrol.ascx.cs" Inherits="wcontrol" %>
<script type ="text/javascript">
function PopupCalendar(InstanceName)
{
///Global Tag
this.instanceName=InstanceName;
///Properties
this.separator="-"
t ......

asp.net½âѹËõÎļþ¼Ð

ÐèÒªÓõ½µÚÈý·½¿Ø¼þICSharpCode.SharpZipLib.dll
using System.IO;
using System.IO.Compression;
using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Checksums;  
  #region ѹËõÎļþ¼Ð,Ö§³ÖµÝ¹é
/// <summary>
   &nb ......

Asp.netÒ³ÃæÖ®¼ä´«µÝ²ÎÊý·½·¨

µÚÒ»ÖÖ·½·¨£º­
     ͨ¹ýURLÁ´½ÓµØÖ·´«µÝ­
send.aspx:­
protected void Button1_Click(object sender, EventArgs e)­
    {­
        Request.Redirect("Default2.aspx?username=honge");­
  &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ