Asp.NET»ñÈ¡Îļþ¼°Æä·¾¶
¡¾Ïà¶Ô·¾¶¡¿
Request.ApplicationPath
/src
Path.GetDirectoryName(HttpContext.Current.Request.RawUrl )
\\src\\Xiaoshe
Context.Request.Path
/src/Xiaoshe/Xiaoshe_New.aspx
Context.Request.CurrentExecutionFilePath
/src/Xiaoshe/Xiaoshe_New.aspx
Context.Request.FilePath
/src/Xiaoshe/Xiaoshe_New.aspx
HttpContext.Current.Request.RawUrl
/src/Xiaoshe/Xiaoshe_New.aspx
HttpContext.Current.Request.Url
http://localhost:1344/src/Xiaoshe/Xiaoshe_New.aspx
TemplateSourceDirectory
/src/Controls
¡¾¾ø¶Ô·¾¶¡¿
Server.MapPath("./")
E:\\Wonsoft\\Pro2\\src\\Xiaoshe\\
Server.MapPath("")
E:\\Wonsoft\\Pro2\\src\\Xiaoshe
Context.Request.PhysicalApplicationPath
E:\\Wonsoft\\Pro2\\src\\
Context.Request.PhysicalPath
E:\\Wonsoft\\Pro2\\src\\Xiaoshe\\Xiaoshe_New.aspx
MapPathSecure(TemplateSourceDirectory)
E:\\Wonsoft\\Pro2\\src\\Controls string
¡¾ÆäËû¡¿
Control.ResolveClientUrl(string relativeUrl)
Control.ResolveUrl(string relativeUrl)
Ïà¹ØÎĵµ£º
½ñÌì¾À½áÁËÒ»ÉÏÎçµÄÎÊÌ⣬ÓÚÏÂÎç3µã12·Ö³¾°£Â䶨£¡
ÊÂÇéÊÇÕâÑùµÄ£º
×÷Ϊһ¸öÀï³Ì±®¼Ç¼Ï°ɣ¬Ò²ËãÊÇÎÒµÚÒ»´Î½«asp.netÓëÊý¾Ý¿â½áºÏ£¬²¢Íê³É´ÓÈí¼þ±à³Ìµ½webµÄ¹ý¶É¡£
Ôڴ˸Ðл½ñÌìΪÎÒ½â¾öÎÊÌâµÄ“ɱÊÖ”£¨Ò²³ÆÀϵÀ£©£¬»¹ÓÐÒÔǰΪÎÒ½â¾öÎÊÌâµÄ´ó¶Ó¡¢Óù·ç¡¢»ª¸çµÈÅ£...
ÑÔ¹éÕý´«£¬±¾ÎĽéÉÜÒ»ÏÂÔõÑùÔÚasp. ......
Global.asaxÎļþ£¬ÓÐʱºò½Ð×öÓ¦ÓóÌÐòÎļþ£¬ÌṩÁËÒ»ÖÖÔÚÒ»¸öÖÐÐÄλÖÃÏìÓ¦Ó¦ÓóÌÐò¼¶»òÄ£¿é¼¶Ê¼þµÄ·½·¨¡£Äã¿ÉÒÔʹÓÃÕâ¸öÎļþʵÏÖÓ¦ÓóÌÐò°²È«ÐÔÒÔ¼°ÆäËüһЩÈÎÎñ¡£ÏÂÃæÈÃÎÒÃÇÏêϸ¿´Ò»ÏÂÈçºÎÔÚÓ¦Óù¤×÷ÖÐʹÓÃÕâ¸öÎļþ¡£
¸ÅÊö
Global.asaxλÓÚÓ¦ÓóÌÐò¸ùĿ¼Ï¡£ËäÈ»VisualStudio.NET»á×Ô¶¯²åÈëÕâ¸öÎ ......
1¡¢Ê¹ÓÃÖµÀàÐ͵ÄToString·½·¨
¡¡¡¡ÔÚÁ¬½Ó×Ö·û´®Ê±£¬¾³£Ê¹ÓÃ"+"ºÅÖ±½Ó½«Êý×ÖÌí¼Óµ½×Ö·û´®ÖС£ÕâÖÖ·½·¨ËäÈ»¼òµ¥£¬Ò²¿ÉÒԵõ½ÕýÈ·½á¹û£¬µ«ÊÇÓÉÓÚÉæ¼°µ½²»Í¬µÄÊý¾ÝÀàÐÍ£¬Êý×ÖÐèҪͨ¹ý×°Ïä²Ù×÷ת»¯ÎªÒýÓÃÀàÐͲſÉÒÔÌí¼Óµ½×Ö·û´®ÖС£µ«ÊÇ×°Ïä²Ù×÷¶ÔÐÔÄÜÓ°Ïì½Ï´ó£¬ÒòΪÔÚ½øÐÐÕâÀà´¦Àíʱ£¬½«ÔÚÍйܶÑÖзÖÅäÒ»¸öеĶÔÏó£¬ÔÓеÄÖµ ......
http://www.cnblogs.com/JimmyZhang/archive/2007/11/25/971878.html
ÒýÑÔ
Http ÇëÇó´¦ÀíÁ÷³Ì ºÍ Http Handler ½éÉÜ ÕâÁ½ÆªÎÄÕÂÀÎÒÃÇÊ×ÏÈÁ˽âÁËHttpÇëÇóÔÚ·þÎñÆ÷¶ËµÄ´¦ÀíÁ÷³Ì£¬ËæºóÎÒÃÇÖªµÀHttpÇëÇó×îÖÕ»áÓÉʵÏÖÁËIHttpHandler½Ó¿ÚµÄÀà½øÐд¦Àí(Ó¦¸Ã¼ÇµÃPageÀàʵÏÖÁËIHttpHandler)¡£´Ó Http ÇëÇó´¦ÀíÁ÷³Ì Ò»ÎĵÄ×îºóµÄ ......