Ïê½âASP.NET»º´æµÄ¹¤×÷ÔÀí
ÕâÀïÎÒÃǽ«½éÉÜASP.NET»º´æµÄ¹¤×÷ÔÀí£¬°üÀ¨¼òµ¥µÄ¶¨Ò壬Êý¾Ý»º´æÒÔ¼°»º´æµÄÉèÖõȵÈÄÚÈÝ¡£Ï£Íû±¾ÎÄÄܶԴó¼Ò½ñºóµÄ¹¤×÷ÓÐËù°ïÖú¡£
ÈçºÎ±ÜÃâASP.NET»º´æÕ¼ÓÃϵͳ×ÊÔ´
ÔÙ̸ASP.NET»º´æ»úÖÆ£º¿ª·¢Ð§ÂÊÓëÓÅ»¯µÄ..
ASP.NET»º´æ»úÖÆ»ù´¡¸ÅÄî
ASP.NET»º´æÊý¾ÝÌí¼Ó·½·¨Ò»ÀÀ
ASP.NET»º´æÊý¾Ý¼¼ÇÉÈýÔò
½éÉÜ
»º´æÊÇÔÚÄÚ´æ´æ´¢Êý¾ÝµÄÒ»Ïî¼¼Êõ£¬Ò²ÊÇ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)
Ïà¹ØÎĵµ£º
×î½ü£¬Òª×öÒ»¸öµÇ½µÄÒ³Ã棬¾ÍÏëµ½ÁË°²È«ÐÔ·½ÃæµÄÎÊÌâ¡£¼ÇµÃÔø¾ÔÚÉÛÖ¾¶«ÀÏʦ½²µÄ¹ØÓÚasp.net°²È«ÐÔ·½ÃæµÄ¿Î³ÌÖУ¬Ìáµ½asp.netÌṩÁË4¸öÉí·ÝÑéÖ¤³ÌÐò£º1.±íµ¥Éí·ÝÑéÖ¤£»2.WindowsÉí·ÝÑéÖ¤£»3.PassportÉí·ÝÑéÖ¤£»4.ĬÈÏÉí·ÝÑéÖ¤¡£ÓÈÆä½²ÁË±íµ¥Éí·ÝÑéÖ¤£¬ÏëÏ룬ÕýºÃ×Ô¼ºÒÔÇ°Ò²²»ÔøʹÓùýÕâ¸öÑ ......
ÔÚ±¾ÑÝÁ·ÖУ¬½«Ê¹ÓÃÈý¸ö ASP.NET AJAX ·þÎñÆ÷¿Ø¼þ£¨ScriptManager ¿Ø¼þ¡¢UpdatePanel ¿Ø¼þºÍ Timer ¿Ø¼þ£©°´¹Ì¶¨µÄʱ¼ä¼ä¸ô¸üв¿·ÖÍøÒ³¡£Í¨¹ý½«ÕâЩ¿Ø¼þÌí¼Óµ½ÍøÒ³ÉÏ£¬¿ÉÏû³ýÔÚÿ´Î»Ø·¢Ê±Ë¢ÐÂÕû¸öÒ³ÃæµÄÐèÒª¡£½«Ö»Ðè¸üРUpdatePanel ¿Ø¼þµÄÄÚÈÝ¡£
1¡¢ÔÚ Microsoft Visual Studio 2005 ......
3¸öÎļþ
code ÀàÎļþ
using System;
using System.Text;
namespace ConcreteMIS.Common.Chinese
{
/// <summary>
/// ºº×ÖÆ´ÒôÉùĸ¼ÆËãÀà
/// Write by WangZhenlong at 2003/11/29
/// </summary>
......
c#£¨»òvb.net£©³ÌÐò¸Ä½ø
1¡¢Ê¹ÓÃÖµÀàÐ͵ÄToString·½·¨
¡¡¡¡ÔÚÁ¬½Ó×Ö·û´®Ê±£¬¾³£Ê¹ÓÃ"+"ºÅÖ±½Ó½«Êý×ÖÌí¼Óµ½×Ö·û´®ÖС£ÕâÖÖ·½·¨ËäÈ»¼òµ¥£¬Ò²¿ÉÒԵõ½ÕýÈ·½á¹û£¬µ«ÊÇÓÉÓÚÉæ¼°µ½²»Í¬µÄÊý¾ÝÀàÐÍ£¬Êý×ÖÐèҪͨ¹ý×°Ïä²Ù×÷ת»¯ÎªÒýÓÃÀàÐͲſÉÒÔÌí¼Óµ½×Ö·û´®ÖС£µ«ÊÇ×°Ïä²Ù×÷¶ÔÐÔÄÜÓ°Ïì½Ï´ó£¬ÒòΪÔÚ½øÐÐÕâÀà´¦Àíʱ£¬½«ÔÚÍйܶÑÖÐ ......