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

asp.net¶¨Ê±Ö´ÐдúÂë

string LogPath;
Thread thread;
void WriteLog()
{
while (true)
{
StreamWriter sw = new StreamWriter(LogPath, true, Encoding.UTF8);
sw.WriteLine(thread.Name + ":" + DateTime.Now.ToString());
sw.Close();
Thread.CurrentThread.Join(1000 * 60);//×èÖ¹1·ÖÖÓ
}
}
void Application_Start(object sender, EventArgs e)
{
LogPath = HttpContext.Current.Server.MapPath("log.txt");
//ÔÚÓ¦ÓóÌÐòÆô¶¯Ê±ÔËÐеĴúÂë
thread = new Thread(new ThreadStart(WriteLog));
thread.Name = "дµÇ¼ÈÕÖ¾Ïß³Ì";
thread.Start();
}


Ïà¹ØÎĵµ£º

ASP.NET³ÌÐòÔ±Ó¦ÓóÌÐòÓòÐëÖª

  ±¾ÎĽ«ÌÖÂÛ.NETµÄÓ¦ÓóÌÐòÓò£¬²¢ÇÒËüÃÇÊÇÈçºÎ¶ÔASP.NETµÄÖ´Ðк͵÷¶È²úÉúÓ°ÏìµÄ¡£  
   
  ¡¡¡¡µ±ÔÚWindowsÖÐÆô¶¯Notepad³ÌÐòʱ£¬ÖÚËùÖÜÖª³ÌÐò»áÖ´ÐÐÒ»¸ö°üº¬ÔÚÈÝÆ÷ÄڵĽø³Ì¡£¿ÉÒÔÆô¶¯¶à¸öNotepadµÄʵÀý£¬²¢ÇÒÿ¸öʵÀý¶¼»áÔÚÒ»¸öרעµÄ½øÐгÌÔËÐС£Ê¹ÓÃÈÎÎñ¹ÜÀíÆ÷£¬¿ÉÒÔ¿´µ½ÔÚϵͳÖе±Ç°ÔËÐÐ ......

asp.net ¶Ô·¾¶***µÄ·ÃÎʱ»¾Ü¾ø

ÔÚwindows 2003ÏÂ,ÔÚÔËÐÐwebÓ¦ÓóÌÐòµÄʱºò³öÏÖһϴíÎó:
        ·þÎñÆ÷ÎÞ·¨´¦ÀíÇëÇ󣬣­£­£¾¶Ô·¾¶“C:\temp\mytest.txt”µÄ·ÃÎʾܾø
˵Ã÷: Ö´Ðе±Ç° Web ÇëÇóÆڼ䣬³öÏÖδ´¦ÀíµÄÒì³£¡£Çë¼ì²é¶ÑÕ»¸ú×ÙÐÅÏ¢£¬ÒÔÁ˽âÓйظôíÎóÒÔ¼°´úÂëÖе¼Ö´íÎóµÄ³ö´¦µÄÏêϸÐÅÏ¢¡£
Òì³ ......

asp.net ÇëÇó²ÎÊý´íÎóÒì³£´¦Àí

package com.accp.filter;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.H ......

[ת]asp.net get setÓ÷¨

     ÔÚÔçÆÚѧϰc#µÄ¹ý³ÌÖУ¬¾­³£Óöµ½ÕâÑùµÄÓï¾ä£º
public string StudentName
{
get{return stuName;}
set{stuName=value;}
}
  
      µ±Ê±Ò²²»ÊǺÜÃ÷°×ΪʲôҪÕâÑù£¿Ñ§ÉîÁËc#ºó£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ