ASP.NET ÅäÖÃ
ʹÓà ConfigurationSettings ¶ÔÏóµÄ AppSettings ÊôÐÔ¼ìË÷ ASP.NET ÅäÖÃÐÅÏ¢¡£
ASP.NET ÔÊÐí¿ª·¢ÈËԱͨ¹ýÖ±½Ó¹«¿ªÅäÖÃÉèÖã¨ÒÔÇ¿ÀàÐÍÊôÐÔµÄÐÎʽ£©»òʹÓó£¹æÅäÖà API£¬´ÓÓ¦ÓóÌÐòÖзÃÎÊÅäÖÃÉèÖá£ÏÂÃæµÄʾÀýÏÔʾÁËÒ»¸öʹÓà System.Web.HttpRequest ÀàµÄ Browser ÊôÐÔ·ÃÎÊ <browserCaps> ÅäÖýڵÄÒ³¡£ÕâÊÇÓйØÊôÐԵĹþÏ£±í£¬ÕâЩÊôÐÔ·´Ó³Á˵±Ç°ÕýÔÚ·ÃÎÊÒ³µÄä¯ÀÀÆ÷¿Í»§¶Ë¹¦ÄÜ¡£Êµ¼ÊµÄ <browserCaps> ½ÚÊý¾Ý°üº¬ÔÚ machine.config ÎļþÖС£
ÒÔÏÂÄÚÈÝΪ³ÌÐò´úÂ룺
<%@ Page Language="C#" %>
<html>
<body style="font: 10.5pt ËÎÌå" mce_style="font: 10.5pt ËÎÌå">
<h3>¼ìË÷ä¯ÀÀÆ÷¹¦ÄÜ</h3>
Boolean ActiveXControls = <%=Request.Browser.ActiveXControls.ToString()%><br>
Boolean AOL = <%=Request.Browser.AOL.ToString()%><br>
Boolean BackgroundSounds = <%=Request.Browser.BackgroundSounds.ToString()%><br>
Boolean Beta = <%=Request.Browser.Beta.ToString()%><br>
String Browser = <%=Request.Browser.Browser%><br>
Boolean CDF = <%=Request.Browser.CDF.ToString()%><br>
Boolean Cookies = <%=Request.Browser.Cookies.ToString()%><br>
Boolean Crawler = <%=Request.Browser.Crawler.ToString()%><br>
Boolean Frames = <%=Request.Browser.Frames.ToString()%><br>
Boolean JavaApplets = <%=Request.Browser.JavaApplets.ToString()%><br>
Boolean JavaScript = <%=Request.Browser.JavaScript.ToString()%><br>
Int32 MajorVersion = <%=Request.Browser.MajorVersion.ToString()%><br>
Double MinorVersion = <%=Request.Browser.MinorVersion.ToString()%><br>
String Platform = <%=Request.Browser.Platform%><br>
Boolean Tables = <%=Request
Ïà¹ØÎĵµ£º
+++ Äã¿ÉÒÔÔÚÓ¦ÓóÌÐòÖÐʹÓÃCache¶ÔÏó·ÃÎÊ»º´æÏʹÓÃCache¶ÔÏóµÄInsert·½·¨½«Ò»¸ö»º´æÏîÌí¼Óµ½Ó¦ÓóÌÐò»º´æÖУ¬¸Ã·½·¨ÓкܶàÖØÔØ·½·¨£¬ÈÃÄãÓò»Í¬µÄ»º´æ²ßÂÔ½«Ò»¸ö»º´æÏîÌí¼Óµ½»º´æÖС£
+++ Èç¹ûÄãÓÃInsert·½·¨Ïò»º´æÖÐÌí¼Ó»º´æÏ²¢ÇÒ»º´æÖдæÔÚͬÃû»º´æÏÄÇô£¬»º´æÖеÄͬÃû»º´æÏ±»Ìæ»»£¨¸²¸Ç£©¡£
+++ ÄãÒ²¿ÉÒÔ ......
+++ ¹æ¶¨»º´æÏîµÄ¼üÖµ¾Í¿ÉÒÔ´Ó»º´æÖмìË÷»º´æÏîµÄÊý¾Ý¡£È»¶ø£¬ÒòΪ±£´æÔÚ»º´æÖеÄÊý¾ÝÊDz»Îȶ¨µÄ£¬¿ÉÄܻᱻASP.NETÒƳý£¬ËùÒÔ£¬ÍƼöµÄ¿ª·¢·½Ê½ÎªÓ¦¸ÃÏÈÈ·¶¨»º´æÏîÊÇ·ñ´æÔÚ£¬Èç¹û²»´æÔÚ£¬Ó¦¸ÃÏÈÌí¼Ó¸Ã»º´æÏîµ½»º´æ£¬È»ºóÔÙ¼ìË÷¸Ã»º´æÏî¡£
+++ ¼ìË÷»º´æÏî
ÏÂÃæµÄÀý×ÓÑÝʾ£¬È·¶¨ÃûΪ“CacheItem”µÄ»º´æÏîÊÇ·ñ´æÔÚ ......
+++ ASP.NET»º´æÖеÄÊý¾ÝÊDz»Îȶ¨µÄ£¬²»»á±»ÓÀ¾ÃµØ´æ´¢£¬¿ÉÄÜ»áÓÉÓÚÒÔÏÂÔÒòÖ®Ò»¶ø´Ó»º´æÖб»×Ô¶¯ÒƳý£º
1) »º´æÂúÁË
2) »º´æÏîÒѾ¹ýÆÚ
3) »º´æÒÀÀµµÄÏî¸Ä±äÁË
+++ ³ýÁË¿ÉÒÔ×Ô¶¯ÒƳý»º´æÏîÍ⣬Äã¿ÉÒÔÏÔʾÒƳý»º´æÏî¡£ÁíÍ⣬µ±ÄãÓÃInsert·½·¨ºÍAdd·½·¨Ïò»º´æÖÐÌí¼ÓµÄ»º´æÏîÒѾ´æÔÚʱ£¬ÄÇô£¬ÔÀ´µÄ»º´æÏ±»×Ô¶¯É¾³ý¡ ......
private
static
CacheItemRemovedCallback OnCacheRemove
=
null
;
protected
void
Application_Start(
object
sender, EventArgs e)
{
AddTask(
"
DoStuff
"
,
60
);
}
private
vo ......
ÉÏ´Îд¹ýһƪMVC·ÖÒ³µÄ
×Ô¼ºÓõÄÒ»¸öASP.Net MVC·ÖÒ³ÄóöÀ´·ÖÏíÏÂ
ÏÖÔÚ·¢Ò»¸ö¸Ä½ø°æ
ÀïÃæÓõ½µÄIPagedListÎÒ×Ô¼ºÒ²¼Ç²»ÇåÊÇ´ÓÄÄÀïCOPYÀ´µÄÁË¡£ºÇºÇ
ÕâÀïÎҾͲ»°ÑIPagedListµÄ´úÂëÌù³öÀ´ÁË£¬ÒªÊ¹µÄÏÂÔØDEMO×Ô¼ºÄðɡ£
ºǫ́¶ÔÊý¾ÝµÄ·ÖÒ³
public ActionResult Index([DefaultValue(1)]int p,[DefaultValue(10)]int pages ......