asp.netÖÐÏÔʾÔÚÏßÓû§
asp.netÖÐÏÔʾÔÚÏßÓû§
private static System.Threading.Timer timer;
private const int interval = 1000 * 60 * 20;//¼ì²éÔÚÏßÓû§µÄ¼ä¸ôʱ¼ä
/// <summary>
/// ±ØÐèµÄÉè¼ÆÆ÷±äÁ¿¡£
/// </summary>
private System.ComponentModel.IContainer components = null;
public Global()
{
InitializeComponent();
}
protected void Application_Start(Object sender, EventArgs e)
{
if (timer == null)
timer = new System.Threading.Timer(new System.Threading.TimerCallback(ScheduledWorkCallback),
sender, 0, interval);
DataTable userTable = new DataTable();
userTable.Columns.Add("UserID");//Óû§ID
userTable.Columns.Add("UserName");//Óû§ÐÕÃû
userTable.Columns.Add("FirstRequestTime");//µÚÒ»´ÎÇëÇóµÄʱ¼ä
userTable.Columns.Add("LastRequestTime");//×îºóÒ»´ÎÇëÇóµÄʱ¼ä
userTable.Columns.Add("ClientIP");//
userTable.Columns.Add("ClientName");//
userTable.Columns.Add("ClientAgent");//
userTable.PrimaryKey = new DataColumn[]{userTable.Columns[0]};
userTable.AcceptChanges();
Application.Lock();
Application["UserOnLine"] = userTable;
Application.UnLock();
}
protected void Session_Start(Object sender, EventArgs e)
{
}
protected void Application_BeginRequest(Object sender, EventArgs e)
{
}
protected void Application_EndRequest(Object sender, EventArgs e)
{
}
protected void Application_AcquireRequestState(Object sender, EventArgs e)
{
if(sender == null) return;
if(!(sender is HttpApplication)) return;
HttpApplication mApp = (HttpApplication)sender;
if(mApp.Context.Session == null) return;
if(mApp.Context.Session["UserID"]==null ) return;
string userID = mApp.Context.Session["UserID"].ToString();
if(Application["UserOnLine"] == null) return;
if(!(Application["UserOnLine"] is DataTable)) return;
DataTable userTable = (DataTable)Application["UserOnLine"];
DataRow curRow = userTable.Rows.Find(new object[]{userID});
if(curRow != null)
{
this.GetDataRowfromHttpApp(mApp,ref curRow);
}
else
{
DataRow newRow = userTable.NewRow();
this.GetDataRowfromHtt
Ïà¹ØÎĵµ£º
Òý×Ô: http://renhappy20066.blog.163.com/blog/static/112080786200961172521923/
ASP.NETÒ³ÃæÖØ¶¨Ïò·½·¨Ð¡½á
asp.net 2009-07-11 07:25 ÔĶÁ54 ÆÀÂÛ0
×ֺţº ´ó´ó ÖÐÖРСС
Ò³ÃæÖØ¶¨ÏòµÄʹÓúܶ࣬ʵÏÖ·½·¨Ò²Óв»Í¬£¬×Ô¼ºÒ²ÊÔ¹ý¼¸ÖÖ£¬ÏÖÔÚ×ܽáһϡ£ ......
ѧasp.net²»ÊǺܾÃ,×öÁËÒ»¸ö OA µÄÏîÄ¿,Óöµ½ºÜ¶àÎÊÌâ,ÔÚ´ËMarkÒ»ÏÂ,ÕâЩ¶¼ÊÇÏîÄ¿Öо³£Óöµ½µÄÎÊÌâ,ÎÒËѼ¯ÍøÉϵĽâ¾ö·½°¸,×öÁËÒ»¸öСµÄ×ܽá.Ò²ÈÃÓöµ½Í¬ÑùÎÊÌâµÄITѧ×ÓÓÐЩ°ïÖú.
×¢: ÈËÈËΪÎÒ,ÎÒΪÈËÈË!
1¡¢½â¾öÁË framework2.0 ¼Ü¹¹Ï ×ÓÒ³ ÄÚÈÝ ÒýÓÃupdatepanel µ¼Ö ajax¿Ø¼þ ¾¯¸æÎª:Î´ÖªÔªËØ,´úÂëÅŰæÎÉ ......
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Mail;
using System.Net.Mime;
using System.Net.Configuration;
namespace BCore.PubFunction
{
public class MailHandler
{
&n ......
VS2005µ÷ÊÔasp.net³ÌÐòʱ³öÏÖ----Internet Explorer ÎÞ·¨ÏÔʾ¸ÃÒ³Ãæ
ÈçͼËùʾ£º
ǰ¶Îʱ¼ä¿ÉÒÔµ÷ÊԵģ¬ËÖª×òÍíͻȻ²»ÐÐÁË£¬ÕÒÁ˺þã¬ÖÕÓÚÕÒµ½½â¾ö·½°¸¡£ÓõÄÊÇVS2005£¬Îļþϵͳ£¬ÔÚIISÀïÃæÉèÖõϰ£¬¿ÉÒÔÔËÐУ¬´úÂëûÎÊÌ⣬Êý¾Ý¿âÁ¬½ÓûÎÊÌâ¡£
·½°¸Ò»£ºÍ¨¹ýÓÒ»÷ASP.NET Development Server£¬Èçͼ£º
´ò¿ª1£¬ÔÚĬÈÏä¯ÀÀÆ ......