asp.net »ñÈ¡ÍøÕ¾¸ùĿ¼
»ñÈ¡ÍøÕ¾¸ùĿ¼µÄ·½·¨Óм¸ÖÖÈ磺
Server.MapPath(Request.ServerVariables["PATH_INFO"])
Server.MapPath("/")
Server.MapPath("")
Server.MapPath(".")
Server.MapPath("../")
Server.MapPath("..")
Page.Request.ApplicationPath
ÒÔÉϵĴúÂëÔÚhttp://localhost/EnglishClub/manage/WebForm1.aspxÒ³Ãæ
ÔËÐнá¹û£º
C:\Inetpub\wwwroot\EnglishClub\manage\WebForm1.aspx
C:\Inetpub\wwwroot\
C:\Inetpub\wwwroot\EnglishClub\manage
C:\Inetpub\wwwroot\EnglishClub\manage
C:\Inetpub\wwwroot\EnglishClub\
C:\Inetpub\wwwroot\EnglishClub
ÒÔÉϵķ½·¨¿ÉÒÔÔÚ.aspxÖзÃÎÊ£¬µ«ÊÇÈç¹ûÄãÔÚ¡£csÎļþ¾Í²»ÄÜÓá£
HttpContext.Current.Server.MapPath();
System.Web.HttpContext.Current.Request.PhysicalApplicationPath ÔÚ.csÎļþÖпÉÒÔÓᣵ«ÊÇHttpContext.Current.Server.MapPath();Õâ¸ö»ñÈ¡µÄÊÇÎļþµÄ·¾¶¶ø²»ÊǸùĿ¼¡£Ö»ÓÐ
System.Web.HttpContext.Current.Request.PhysicalApplicationPath Õâ¸ö²ÅÊÇ»ñÈ¡µÄ¸ùĿ¼£¬ÔÚд»ñÈ¡Êý¾Ý¿â·¾¶ÊÇÓ¦¸ÃÓÃÕâ¸ö£¬ÆäËûµÄ¶¼ÓÐÎÊÌâ¡£
ת×Ô£ºhttp://www.cnblogs.com/langge/archive/2009/10/23/1588715.html
Ïà¹ØÎĵµ£º
Ê×Ïȼòµ¥½éÉÜÒ»ÏÂMD5ºÍSHA1:
MD5µÄÈ«³ÆÊÇMessage-Digest Algorithm 5£¨ÐÅÏ¢-ÕªÒªËã·¨£©£¬ÔÚ90Äê´ú³õÓÉMit Laboratory for Computer ScienceºÍRsa data security incµÄRonald l. rivest¿ª·¢³öÀ´£¬¾md2¡¢md3ºÍmd4·¢Õ¹¶øÀ´¡£ËüµÄ×÷ÓÃÊÇÈôóÈÝÁ¿ÐÅÏ¢ÔÚÓÃÊý×ÖÇ©ÃûÈí¼þÇ©Êð˽ÈËÃܳ×Ç°±»"ѹËõ"³ÉÒ»ÖÖ±£Ãܵĸñʽ£¨¾ÍÊÇ°ÑÒ»¸öÈÎÒâ³ ......
1¡¢DateTime Êý×ÖÐÍ
System.DateTime currentTime=new System.DateTime();
1.1 È¡µ±Ç°ÄêÔÂÈÕʱ·ÖÃë
currentTime=System.DateTime.Now;
1.2 È¡µ±Ç°Äê
&nb ......
asp.netÈçºÎ°ÑÎļþÉÏ´«µ½ÁíÍâһ̨·þÎñÆ÷?
ÎÒÓÃÓ³ÉäÍøÂçÅ̵ÄÐÎʽ,¿ÉÊdzÌÐòÎÞ·¨½«Îļþ±£´æµ½ÍøÂçÓ³ÉäÅÌÉÏ.
ÈçºÎ¹²ÏíÎļþ¼ÐµÄ»°,Îļþ¼Ð±ØÐëÓÐдÈëµÄȨÏÞ,¿ÉÊÇÕâÑùµÄ»°¾ÖÓòÍøÄÚËùÓеÄÈ˶¼¿ÉÒÔÉÏ´«µ½Õâ¸ö¹²ÏíĿ¼ÁË?
½¨Ò飺
Õâ¸öÎÒÕýºÃ×ö¹ýµÄ£¬ºÇºÇ£¬¸øÄã²Î¿¼
¼ÙÉèÓзþÎñÆ÷AÊÇweb·þÎñÆ÷£¬ÎļþҪͨ¹ýA·þÎñÆ÷ÉϵÄweb³ÌÐòÉÏ´«µ ......
ASP.NETÌṩÁËSession¶ÔÏ󣬴ӶøÔÊÐí³ÌÐòԱʶ±ð¡¢´æ´¢ºÍ´¦Àíͬһ¸öä¯ÀÀÆ÷¶ÔÏó¶Ô·þÎñÆ÷ÉÏij¸öÌض¨ÍøÂçÓ¦ÓóÌÐòµÄÈô¸É´ÎÇëÇóµÄÉÏÏÂÎÄÐÅÏ¢¡£Session¶ÔÓ¦ä¯ÀÀÆ÷Óë·þÎñÆ÷µÄͬһ´Î¶Ô»°£¬ÔÚä¯ÀÀÆ÷µÚÒ»ÇëÇóÍøÂçÓ¦ÓóÌÐòµÄij¸öÒ³Ãæʱ£¬·þÎñÆ÷»á´¥·¢Session_onStartʼþ£»ÔÚ¶Ô»°³¬Ê±»òÕß±»¹Ø±ÕµÄʱºò»á´¥·¢Session_onEnd ʼþ¡£³ÌÐòÔ± ......
@PageÖ¸ÁîλÓÚÿ¸öASP.NETÒ³ÃæµÄ¶¥²¿£¬¸æËßASP.NETÕâ¸ö¾ßÌåÒ³ÃæʹÓÃʲôÊôÐÔ£¬ÒÔ¼°¸ÃÒ³Ãæ¼Ì³ÐµÄÓû§¿Ø¼þ¡£ASP.NETÒ³Ãæ
@PageÖ¸ÁîÊôÐÔÓУºAspCompat¡¢Async¡¢AsyncTimeout¡¢AutoEventWireup¡¢Buffer¡¢
ClassName¡¢ClientIDMode¡¢CodeBehind¡¢
CodeFile¡¢CodeFileBaseClass¡¢CodePage¡¢CompilationMode ¡¢ContentType¡¢
......