asp.net¼Æ»®ÈÎÎñ¹ÜÀí³ÌÐòʵÏÖ£¬¶àÏß³ÌÈÎÎñ¼ÓÔØ
b/sģʽÏÂÓóÌÐòʵÏּƻ®ÈÎÎñ£¬Ò»Ö±ÊǸö²»Ì«ºÃ½â¾öºÍ¹ÜÀíµÄÎÊÌ⣬µ±È»¿ÉÒÔ²ÉÓÃajax ¼ÆʱÆ÷µÄ·½·¨Ä£Äâform¶ËµÄtimerʼþ¡£asp.netÏÂʵÏÖ¿ÉÒÔ½«¼Æ»®ÈÎÎñµÄ·½·¨·ÅÔÚglobalÀʹÓÃÒ»¸öͳһµÄÈÎÎñ¹ÜÀíÀàÀ´¹ÜÀí¸÷ÖÖÈÎÎñµÄÖ´ÐУ¬×öµ½²¢Ðв»ã££¡
ÏÂÃæÊÇÎÒдµÄÒ»¸ö·½·¨£¬Ï£ÍûÆð¸öÅ×שÒýÓñµÄ×÷Óã¡´ó¼ÒÒ»ÆðѧϰÏ£º
µÚÒ»²½¶¨ÒåÒ»¸ö½Ó¿Ú£¬ÓÃÀ´¹æ·¶ÈÎÎñ±ØÐëҪʵÏֵĶ¯×÷£¬¸Ã½Ó¿ÚÖ»ÓÐÒ»¸ö·½·¨£¨¼òµ¥Æð¼û£©£º
/// <summary>
/// ¹¤×÷µ¥Ôª½Ó¿Ú,¶¨ÒåÒ»¸ö¼Æ»®ÈÎÎñ±ØÐëÍê³ÉµÄ¹¤×÷
/// </summary>
public interface IScheduledTask
{
/// <summary>
/// ÈÎÎñÖ´ÐÐ
/// </summary>
void Execute();
}
µÚ¶þ²½£¬¶¨ÒåÒ»¸öÀ࣬ÓÃÀ´¹ÜÀí¼Æ»®ÈÎÎñµÄÖ´Ðк͹رգº
/// <summary>
/// ÓÃÀ´Ö´Ðмƻ®ÈÎÎñµÄ»ù±¾¶ÔÏó
/// </summary>
public class ScheduledTask
{
private static readonly ScheduledTask _ScheduledTask = null;
private Timer UpdateTimer = null;
/// <summary>
/// ¼ä¸ôʱ¼ä,µ¥Î»ÎªºÁÃë
/// </summary>
private int interval = 10 * 1000;
/// <summary>
/// ¼ä¸ôʱ¼ä,µ¥Î»ÎªºÁÃë
/// </summary>
public int Interval
{
get { return this.interval; }
set { this.interval = value; }
}
/// <summary>
/// ÈÎÎñÊÇ·ñÍê³É±êÖ¾
/// </summary>
private int _IsRunning;
/// <summary>
/// ¾²Ì¬¹¹Ô캯Êý,±£Ö¤ÊµÀýµÄΨһÐÔ
/// </summary>
static ScheduledTask()
{
_ScheduledTask = new ScheduledTask();
}
/// <summary>
/// ÈÎÎñ¶ÓÁÐ
/// </summary>
private ArrayList tasks = new ArrayList();
/// <summary>
/// ÈÎÎñ¶ÓÁÐ
/// </summary>
public ArrayList Tasks { get { return tasks; } }
/// <summary>
/// ·µ»ØÈÎÎñʵÀý
/// </summary>
/// <returns>&
Ïà¹ØÎĵµ£º
ÌõÐÎÂëÊÇÆù½ñΪֹ×á¢ÊµÓõÄÒ»ÖÖ×Ô¶¯Ê¶±ð¼¼Êõ¡£ÌõÐÎÂë¼¼Êõ¾ßÓÐÒÔϼ¸¸ö·½ÃæµÄÓŵã
¡¡¡¡A£®ÊäÈëËٶȿ죺Óë¼üÅÌÊäÈëÏà±È£¬ÌõÐÎÂëÊäÈëµÄËÙ¶ÈÊǼüÅÌÊäÈëµÄ5±¶£¬²¢ÇÒÄÜʵÏÖ“¼´Ê±Êý¾ÝÊäÈ딡£
¡¡¡¡B£®¿É¿¿ÐԸߣº¼üÅÌÊäÈëÊý¾Ý³ö´íÂÊΪÈý°Ù·ÖÖ®Ò»£¬ÀûÓùâѧ×Ö·ûʶ±ð¼¼Êõ³ö´íÂÊΪÍò·ÖÖ®Ò»£¬¶ø²ÉÓÃÌõÐÎÂë¼¼ÊõÎóÂëÂʵ ......
ÎÒÃÇ»¹¿ÉÒÔ²ÉÓÃÒ»ÖÖ¸ü¼Ó¼ò±ãµÄ·½
·¨À´ÊµÏÖÉÏÊö³ÌÐòµÄ¹¦ÄÜ¡£Õâ¾ÍÊǽ«SqlConnection¶ÔÏó°üº¬µ½usingÇø¿éÖУ¬ÕâÑù³ÌÐò»á×Ô¶¯µ÷ÓÃDispose()·½·¨ÊÍ·Å
SqlConnection¶ÔÏóËùÕ¼ÓõÄϵͳ×ÊÔ´£¬ÎÞÐèÔÙʹÓÃSqlConnection¶ÔÏóµÄClose()·½·¨¡£
·¶Àý³ÌÐò´úÂëÈçÏ£º
public partial class _Default : System.Web.UI.Page
{
......
´Ë´¦ÌṩµÄ´úÂëÓÃÀ´ÊµÏÖµ±asp.netÒ³ÃæÖеÄij¸öButton±»µã»÷ºódisableµô¸ÃÒ³ÃæÖÐËùÓеÄButton£¬´Ó¶ø·ÀÖ¹Ìá½»ÑÓʱµ¼ÖµĶà´ÎÌá½»¡£»ùÓÚ֮ǰµÄonceclickbutton½Å±¾.
//ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂë:javascript< script language="javascript"> < !-- function disableOtherSubmit() {
var obj = event.srcEl ......
¡¡¡¡.Net ÀïÉÏ´«´óÎļþʱ£¬»áÓöµ½³¬Ê±»òHTTP500´íÎ󣬽â¾öµÄ°ì·¨ÓÐÁ½ÖÖ£ºÒ»ÖÖÊÇÐÞ¸ÄÅäÖã¬ÁíÒ»ÖÖ¾ÍÊÇÓõÚÈý·½¿Ø¼þ¡£ÕâÀï½éÉÜÒ»ÏÂÐÞ¸ÄÅäÖõġ£
ÐèÒªÐ޸ĵÄÊÇ
ÔÚ C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIGĿ¼À
ÕÒµ½ÎļþmaxRequestLength="4096"
½«ÖµÐ޸ĴóһЩ£¬ÀýÈ磺102400
Õâ¸ö²ÎÊýµÄµ¥Î»Ó¦¸ÃÊ ......
¡¡¡¡×Ô´ÓÉÏ´ÎÓÐÁËÒ»´ÎÆƽâÑéÖ¤ÂëµÄ¾Ñéºó£¬¾ÍÒ»Ö±Ïë×Ô¼ºÐ´¸öÏñÑùµãµÄÑéÖ¤Âë¡£½ñÌìÎÞÁÄËùÒÔ¾ÍдÁË£¬×ÜÌåÉÏÀ´Ëµ»¹ËãºÜÂúÒâ¡£¾ÍÊÇÓÐʱ¸´ÔÓµÃÈâÑÛ¶¼¿´²»³öÊÇɶ£¨ÕâÒ²¸úͼƬ̫СÓйØϵ£©¡£
¡¡¡¡Õâ¸öÑéÖ¤ÂëÖ§³ÖËæ»ú×ÖÌå¡¢×ÖÌå´óС¡¢×ÖÌåÑùʽ£¨ÆÕͨ¡¢´ÖÌ塢бÌ壩¡¢×ÖÌåÑÕÉ«¡¢×Ô¶¨Òå×Ö·ûµÈ¡£
¡¡¡¡´úÂëÖеÄlibFontÊÇ×ÖÌå¿â£¬libC ......