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

ASP.NET»º´æ

Ô­ÎĵØÖ·£ºhttp://www.codeproject.com/KB/aspnet/AspDotNetCache.aspx
½éÉÜ
»º´æÊÇÔÚÄÚ´æ´æ´¢Êý¾ÝµÄÒ»Ïî¼¼Êõ£¬Ò²ÊÇASP.NETÖÐÌṩµÄÖØÒªÌØÐÔÖ®Ò»¡£ÀýÈçÄã¿ÉÒÔÔÚ¸´ÔÓ²éѯµÄʱºò»º´æÊý¾Ý£¬ÕâÑùºóÀ´µÄÇëÇó¾Í²»ÐèÒª´ÓÊý¾Ý¿âÖÐÈ¡Êý¾Ý£¬¶øÊÇÖ±½Ó´Ó»º´æÖлñÈ¡¡£Í¨¹ýʹÓûº´æ¿ÉÒÔÌá¸ßÓ¦ÓóÌÐòµÄÐÔÄÜ¡£
Ö÷ÒªÓÐÁ½ÖÖÀàÐ͵Ļº´æ£º
1.Êä³ö»º´æOutput caching
2.Êý¾Ý»º´æData caching
1. Êä³ö»º´æ(Output Caching)
ʹÓÃÊä³ö»º´æ£¬Äã¿ÉÒÔ»º´æ×îºóÊä³öµÄHTMLÒ³Ã棬µ±ÏàͬµÄÒ³ÃæÔÙ´ÎÇëÇóµÄʱºò£¬ASP.NET²»»áÔÙÖ´ÐÐÒ³ÃæµÄÉúÃüÖÜÆÚºÍÏà¹Ø´úÂë¶øÊÇÖ±½ÓʹÓûº´æµÄÒ³Ã棬Óï·¨ÈçÏ£º
<%@ OutputCache Duration=”60” VaryByParam=”None” %>
Duration ÊôÐÔÉèÖÃÒ³Ã潫±»»º´æ60Ãî¡£ÈκεÄÓû§ÇëÇ󶼻ᱻ»º´æ£¬ÔÚ»º³åµÄ60ÃëÄÚÏàͬµÄÇëÇ󶼻áÖ±½ÓʹÓûº´æµÄÒ³Ãæ¡£µ±»º´æ¹ýÆÚºóASP.NET»áÔÙ´ÎÖ´ÐÐÒ³Ãæ´úÂë²¢ÇÒΪÏÂÒ»¸ö60Ãë´´½¨Ò»¸öеÄHTML»º´æ¡£
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="OutputCachingTest.aspx.cs" Inherits="OutputCachingTest" Title="Untitled Page" %>
<%@ OutputCache Duration="20" VaryByParam="None" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class="title">Output Cache</div>
Date: <asp:Label ID="lblDate" runat="server" Text="" />
Time: <asp:Label ID="lblTime" runat="server" Text="" />
</asp:Content>
protected void Page_Load(object sender, EventArgs e)
{
lblDate.Text = DateTime.Now.ToShortDateString();
lblTime.Text = DateTime.Now.ToLongTimeString();
}
ÔÚÕâ¸öÀý×ÓÖÐÒ³Ã潫±»»º´æ20Ãë¡£
ͨ¹ý²éѯ×Ö·û´®»º´æ(Cache by Query String )
ÔÚʵ¼ÊÓ¦ÓÃÖÐÒ³ÃæÍùÍù»á¸ù¾ÝһЩ²ÎÊý¶¯Ì¬µÄ¸Ä±äÒ³ÃæµÄÄÚÈÝ¡£Èç¹ûÄãµÄÒ³ÃæÊÇͨ¹ý²éѯ×Ö·û´®À´»ñÈ¡ÐÅÏ¢µÄ£¬Äã¿ÉÒÔ¸ù¾Ý²éѯ×Ö·û´®ºÜÈÝÒ׵Ļº´æÒ³ÃæµÄ²»Í¬¿½±´¡£VarByParam=”None”Ö¸¶¨ASP.NETÖ»´æ´¢»º´æÒ³ÃæµÄÒ»¸ö¿½±´¡£VarByParam=”*” Ö¸¶¨ASP.NET¸ù¾Ý²»Í¬µÄ²éѯ×Ö·û´®´æ´¢²»Í¬µÄ»º´æÒ³Ãæ¡£
<%@ OutputCache Duration="60" VaryByParam="*" %>
<div align="right">
<a href="Outp


Ïà¹ØÎĵµ£º

ASP.NET¹ØÓÚÌõÐÎÂëµÄÉú³ÉÎÊÌâ¼æÍøÒ³´òÓ¡

ÌõÐÎÂëÊÇÆù½ñΪֹ×î¾­¼Ã¡¢ÊµÓõÄÒ»ÖÖ×Ô¶¯Ê¶±ð¼¼Êõ¡£ÌõÐÎÂë¼¼Êõ¾ßÓÐÒÔϼ¸¸ö·½ÃæµÄÓŵã
¡¡¡¡A£®ÊäÈëËٶȿ죺Óë¼üÅÌÊäÈëÏà±È£¬ÌõÐÎÂëÊäÈëµÄËÙ¶ÈÊǼüÅÌÊäÈëµÄ5±¶£¬²¢ÇÒÄÜʵÏÖ“¼´Ê±Êý¾ÝÊäÈ딡£
¡¡¡¡B£®¿É¿¿ÐԸߣº¼üÅÌÊäÈëÊý¾Ý³ö´íÂÊΪÈý°Ù·ÖÖ®Ò»£¬ÀûÓùâѧ×Ö·ûʶ±ð¼¼Êõ³ö´íÂÊΪÍò·ÖÖ®Ò»£¬¶ø²ÉÓÃÌõÐÎÂë¼¼ÊõÎóÂëÂʵ ......

dz̸ASP.net°²È«±à³Ì

ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......

ASP.NET´úÂëÉú³É¹¤¾ßcodesmith

     ÕâÁ½ÌìÊìϤ¹«Ë¾µÄÍøվǰ̨ºÍºǫ́µÄÊý¾Ý½á¹¹ºÍÒµÎñÂß¼­£¬¿´µ½Ðí¶à¹¤³Ì϶¼ÓÐÒ»¸ö½Ð“Base”µÄÎļþ¼Ð£¬ÀïÃæÓÐһϵÁдø“***.Generated.cs”µÄÎļþ£¨±ÈÈçBulletin.Generated.cs£©¡£¶®µã±à³Ì֪ʶºÍÓ¢ÓïµÄÈ˶¼Ó¦¸Ã»áÏëµ½ÕâÊÇÓÃʲô¹¤¾ß×Ô¶¯Éú³ÉµÄ°É£¿ÒÔÇ°ÎÒÒ²ÖªµÀC#Óиù¾ÝÄ£°å×Ô¶¯ ......

asp.netÖÐÔõÑùµ÷Óô洢¹ý³ÌºÍ´æ´¢¹ý³ÌµÄд·¨

----´´½¨Ò»¸öÖ»ÓÐÊäÈë²ÎÊýµÄ´æ´¢¹ý³Ì
create procedure proc_user
@name varchar(20),
@Password varchar(100)
as
select * from loginuser
where name like @name
---´´½¨Ò»¸öÓÐÊäÈëºÍÊä³ö²ÎÊýµÄ´æ´¢¹ý³Ì
create procedure proc_usertext
@name varchar(20),
@blog varchar(100) output
as
select @blog = ......

ÊÖ°ÑÊÖ½ÌÄã×öASP.NETÁôÑÔ±¾


ûÓÐÏëµ½ÕæµÄÕâô·½±ã!¸ü¼Ó¼á¶¨ÎÒѧϰASP.NETµÄ¾öÐÄ! ÏÖÔÚÎÒÃÇÒ»ÆðÀ´¿´¿´°É
1,ÇëÈ·¶¨ÄãµÄµçÄÔ°²×°ÁËÒÔϵÄÈí¼þ£¡
1.1£¬    WINDWOS 2000ÒÔÉÏ°æ±¾(±Ø×°)
1.2£¬    .NET Framework(±Ø×°)
1.3£¬    Visual Studio .NET 2005(±Ø×°)
2,½¨Á¢Ò»¸öACCESSÊý¾Ý¿â,
3,Í϶¯VS2005 µÄGRIDVIEW µ½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ