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

ÀûÓÃCache£¬asp.net ¼òµ¥ÊµÏÖ¶¨Ê±Ö´ÐÐÈÎÎñ

private
 
static
 CacheItemRemovedCallback OnCacheRemove 
=
 
null
;
protected
 
void
 Application_Start(
object
 sender, EventArgs e)
{
    AddTask(
"
DoStuff
"

60
);
}
private
 
void
 AddTask(
string
 name, 
int
 seconds)
{
    OnCacheRemove 
=
 
new
 CacheItemRemovedCallback(CacheItemRemoved);
    HttpRuntime.Cache.Insert(name, seconds, 
null
,
        DateTime.Now.AddSeconds(seconds), Cache.NoSlidingExpiration,
        CacheItemPriority.NotRemovable, OnCacheRemove);
}
public
 
void
 CacheItemRemoved(
string
 k, 
object
 v, CacheItemRemovedReason r)
{
    
//
 do stuff here if it matches our taskname, like WebRequest
    
//
 re-add our task so it recurs
    AddTask(k, Convert.ToInt32(v));
}


Ïà¹ØÎĵµ£º

ASP.NET Ò³Ãæ¼ä´«Öµ

ÔÚÒ³Ãæ¼äÌøת,»áÉæ¼°µ½ÖµºÍÊý¾ÝµÄ´«µÝÎÊÌâ.ÌØÓñ¾ÎĽ«ÎÒÖªµÀµÄһЩ·½·¨¹éÄÉÒ»ÏÂ.
1.´ø²ÎÊý´«µÝ
Óŵã:ʹÓ÷½±ã
ȱµã:°²È«ÐÔµÍ,Êʺϴ«µÝ¼òµ¥ÀàÐ͵ĶÔÏó,±ÈÈçÊý×Ö.×Ö·û.µ«¶Ô¶ÔÏó.Êý×éµÈ²»ºÏÊÊ´«µÝ.
Ó¦ÓÃ:
a.°²È«ÐÔ²»¸ß,Ó¦¶Ô·½Ê½:¶Ô´«µÝµÄÖµ½øÐмÓÃÜ.
b.´«µÝ¼òµ¥ÀàÐ͵ĶÔÏó.Ó¦¶Ô·½Ê½:ÔÚ´«µÝҳͨ¹ý¼òµ¥ÀàÐͶÔÏó¸ø³ö±êʶ,ÔÚ ......

Asp.Net Web Form µ÷ÓÃReporting Service

1¡¢aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TransferMoney.aspx.cs" Inherits="BtmsWebApp.report.TransferMoney" MasterPageFile="~/ReportPage.master" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d5 ......

ASP.NET Cache_µÚËÄƪ_ÈçºÎÒƳýASP.NET»º´æÖеĻº´æ

+++ ASP.NET»º´æÖеÄÊý¾ÝÊDz»Îȶ¨µÄ£¬²»»á±»ÓÀ¾ÃµØ´æ´¢£¬¿ÉÄÜ»áÓÉÓÚÒÔÏÂÔ­ÒòÖ®Ò»¶ø´Ó»º´æÖб»×Ô¶¯ÒƳý£º
1) »º´æÂúÁË
2) »º´æÏîÒѾ­¹ýÆÚ
3) »º´æÒÀÀµµÄÏî¸Ä±äÁË
+++ ³ýÁË¿ÉÒÔ×Ô¶¯ÒƳý»º´æÏîÍ⣬Äã¿ÉÒÔÏÔʾÒƳý»º´æÏî¡£ÁíÍ⣬µ±ÄãÓÃInsert·½·¨ºÍAdd·½·¨Ïò»º´æÖÐÌí¼ÓµÄ»º´æÏîÒѾ­´æÔÚʱ£¬ÄÇô£¬Ô­À´µÄ»º´æÏ±»×Ô¶¯É¾³ý¡ ......

ASP.NETÊý¾Ý°ó¶¨_µÚ¶þƪ_ÓÃÊý¾Ý¼¯DataTable°ó¶¨

+++ Ò³Ãæ´úÂëÈçÏ£º
<asp:Button ID="Button1" runat="server" Text="Ìí¼Ó¿ÕÐÐ" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="±£´æËùÓÐ" OnClick="Button2_Click" />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="403px">
  ......

ASP.NETÊý¾Ý°ó¶¨_µÚËÄƪ_ÓÃSqlDataSource¿Ø¼þ°ó¶¨_01

+++ Ò³Ãæ´úÂëÈçÏ£º
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
    AutoGenerateColumns="False" DataKeyNames="username" DataSourceID="SqlDataSource1"
    PageSize="3">
    <Columns>
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ