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

½ÌÄãÈçºÎʵÏÖASP.NETÖÐÍøÕ¾·ÃÎÊÁ¿µÄͳ¼Æ


ÏÂÃæ½éÉÜÈçºÎ½øÐÐASP.NETÖÐÍøÕ¾·ÃÎÊÁ¿µÄͳ¼Æ¡£
Ò»¡¢½¨Á¢Ò»¸öÊý¾Ý±íIPStatÓÃÓÚ´æ·ÅÓû§ÐÅÏ¢
ÎÒÔÚIPStat±íÖдæ·ÅµÄÓû§ÐÅÏ¢Ö»°üÀ¨µÇ¼Óû§µÄIP£¨IP_Address£©£¬IPÀ´Ô´£¨IP_Src£©ºÍµÇ¼ʱ¼ä£¨IP_DateTime£©£¬Ð©±íµÄÐÅÏ¢±¾ÈËÖ»±£´æÒ»ÌìµÄÐÅÏ¢£¬Èç¹ûҪͳ¼ÆÃ¿¸öÔµÄÐÅÏ¢ÔòÒª±£´æÒ»¸öÔ¡£
¶þ¡¢ÔÚGlobal.asaxÖлñÈ¡Óû§ÐÅÏ¢
ÔÚGlobal.asaxµÄSession_Start¼´Ð»ỰÆôÓÃʱ»ñÈ¡ÓйصÄÐÅÏ¢£¬Í¬Ê±ÔÚÕâÀïʵÏÖÔÚÏßÈËÊý¡¢·ÃÎÊ×ÜÈËÊýµÄÔöÁ¿Í³¼Æ£¬´úÂëÈçÏ£º
void Session_Start(object sender, EventArgs e) {
//»ñÈ¡·ÃÎÊÕßµÄIP
string ipAddress = Request.ServerVariables["REMOTE_ADDR"];
//»ñÈ¡·ÃÎÊÕßµÄÀ´Ô´
string ipSrc;
//ÅжÏÊÇ·ñ´ÓËÑË÷ÒýÇæµ¼º½¹ýÀ´µÄ
if (Request.UrlReferrer == null) {
ipSrc = "";
}
else {
//»ñÈ¡À´Ô´µØÖ·
ipSrc = Request.UrlReferrer.ToString();
}
//»ñÈ¡·ÃÎÊʱ¼ä
DateTime ipDatetime = DateTime.Now;
//±£´æIPÐÅÏ¢µ½Êý¾Ý¿âÖÐ
IPControl cont = new IPControl();
cont.AddIP(ipAddress, ipSrc, ipDatetime);
//»ñÈ¡Óû§·ÃÎʵÄÒ³Ãæ
string pageurl = Request.Url.ToString();
//ÅжϷÃÎʵÄÊÇ·ñÊÇĬÈÏÒ³
if (pageurl.EndsWith("IPStat.ASPx")) {
//Ëø¶¨±äÁ¿
Application.Lock();
//ÎªÒ³Ãæ·ÃÎÊÁ¿+1
Application["StatCount"] = int.Parse(Application["StatCount"].ToString()) + 1;
//½âËø
Application.UnLock();
}
//Ëø¶¨±äÁ¿
Session.Timeout = 10;
//É趨³¬Ê±Îª10·ÖÖÓ
Application.Lock();
Application["countSession"] = Convert.ToInt32(Application["countSession"]) + 1;
//·ÃÎÊ×ÜÈËÊý£«£±
Application["onlineWhx"] = (int)Application["onlineWhx"] + 1;
//ÔÚÏßÈËÊý¼Ó£«£±
Session["login_name"] = null;
//½âËø
Application.UnLock();
}
ÌáÐÑÒ»¾ä£¬±ðÍüÁËÏÂÃæµÄ´úÂ룬ÒÔʵÏÖÔÚÓû§ÀëÏßʱ£¬½«ÔÚÏßÈËÊý¼õÈ¥1¡£
void Session_End(object sender, EventArgs e) {
// ÔڻỰ½áÊøÊ±ÔËÐеĴúÂë¡£
// ×¢Òâ: Ö»ÓÐÔÚ Web.config ÎļþÖÐµÄ sessionstate ģʽÉèÖÃΪ InProc ʱ£¬
²Å»áÒý·¢ Session_End ʼþ¡£
Èç¹û»á»°Ä£Ê½ÉèÖÃΪ StateServer
// »ò SQLServer£¬Ôò²»»áÒý·¢¸Ãʼþ¡£
//Ëø¶¨±äÁ¿
Application.Lock();
Application["onlineWhx"] = (int)Application["onlineWhx"] - 1;
//ÔÚÏßÈËÊý¼õ£­£±
Session["login


Ïà¹ØÎĵµ£º

ASP.NET

Ê®¡¢ÈçºÎ£º¶ÁÈ¡ Calendar Web ·þÎñÆ÷¿Ø¼þÖеÄÑ¡¶¨ÈÕÆÚ
      µÚÒ»¸öʾÀýÏÔʾµ±Ç°Ñ¡¶¨µÄÈÕ¡£µÚ¶þ¸öʾÀýÏÔʾËùÓÐÑ¡¶¨µÄÈÕÆÚ£¬¿ÉÒÔÊǵ¥¸öÈÕ¡¢ÖÜ»òÔ¡£
// Example 1
Label1.Text = Calendar1.SelectedDate.ToShortDateString();
 
// Example 2
String s = "";
foreach(DateTime d in Ca ......

[ASP.NET]Log4NetÈ«¹¥ÂÔ

 [ASP.NET]Log4NetÈ«¹¥ÂÔ
ת×Ô:http://blog.5d.cn/vip/icecream/200511/185284.html
ºÜ¶à¿ª·¢Õß¶¼ÏëÒªÒ»¸ö·Ç³£Ç¿´óµÄ³ÌÐòÈÕÖ¾¹ÜÀí¿â£¬Äܹ»Á˽âÓû§¶ÔÓ¦ÓóÌÐòµÄʹÓÃÇé¿ö¡£µ±³ÌÐò³öÏÖÎÊÌâʱ£¬¿ÉÒÔͨ¹ý·ÖÎöÈÕÖ¾À´Á˽âÎÊÌâÖ®ËùÔÚ¡£
¹ýÈ¥ÎÒÃÇ×ÜÊÇÓÃÒ»Öֺܼòµ¥µÄ·½Ê½À´´¦ÀíÈÕÖ¾£¬¼´£ºÊ¹ÓÃÒ»¸öÈÕÖ¾Îļþ£¬µ±³ÌÐòÓÐÎÊÌâʱ¾ ......

asp.netÔ¤±àÒë

 asp.netÓ¦ÓõÚÒ»´Î·ÃÎÊʱʱÓÉÓÚÒª±àÒ룬ËùÒÔ·´Ó¦Âý£¬ÑÏÖØÓ°ÏìÓû§ÌåÑ飡£¨ÒÔÖ±»Óû§±§Ô¹ËÙ¶ÈÂý£º£¨£©£¬Ô¤±àÒëÖ®ºóÃ÷ÏÔÌá¸ß·´Ó¦ËÙ¶È£º£©
Àý£º
D:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_compiler -v /anything -p E:\erp_pr
o_vss0330\1.1\erp_pro_vss\WebApp D:\ERPApp
˵Ã÷£ºanything Èκζ¼ÐÐ ......

Asp.net GridViewÊý¾Ýµ¼³öµ½Excel£¬Word

Ò»¡¢asp.net DataGridViewµ¼³öµ½ExcelµÄÈý¸ö·½·¨
#region DataGridViewÊý¾ÝÏÔʾµ½Excel
/// <summary>
/// ´ò¿ªExcel²¢½«DataGridView¿Ø¼þÖÐÊý¾Ýµ¼³öµ½Excel
/// </summary>
/// <param name="dgv">DataGridView¶ÔÏó </param>
/// <param name="isShowExcle">ÊÇ·ñ ......

ASP.NETÖг£ÓõÄ26¸öÓÅ»¯ÐÔÄÜ·½·¨(20


21. Ö»ÔÚ±ØÒªÊ±±£´æ·þÎñÆ÷¿Ø¼þÊÓͼ״̬ ¡¡¡¡
×Ô¶¯ÊÓͼ״̬¹ÜÀíÊÇ·þÎñÆ÷¿Ø¼þµÄ¹¦ÄÜ£¬¸Ã¹¦ÄÜʹ·þÎñÆ÷¿Ø¼þ¿ÉÒÔÔÚÍù·µ¹ý³ÌÉÏÖØÐÂÌî³äËüÃǵÄÊôÐÔÖµ(Äú²»ÐèÒª±àдÈκδúÂë)¡£µ«ÊÇ£¬ÒòΪ·þÎñÆ÷¿Ø¼þµÄÊÓͼ״̬ÔÚÒþ²ØµÄ´°Ìå×Ö¶ÎÖÐÍù·µÓÚ·þÎñÆ÷£¬ËùÒԸù¦ÄÜȷʵ»á¶ÔÐÔÄܲúÉúÓ°Ïì¡£ÄúÓ¦¸ÃÖªµÀÔÚÄÄЩÇé¿öÏÂÊÓͼ״̬»áÓÐËù°ïÖú£¬ÔÚÄÄÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ