asp.net »ñÈ¡µ±Ç°URLµÄÕýÈ··½·¨
HttpContext.Current.Request.Url.ToString() ²¢²»¿É¿¿¡£
Èç¹ûµ±Ç°URLΪ
http://localhost/search.aspx?user=http://csharp.xdowns.com&tag=%BC%BC%CA%F5
ͨ¹ýHttpContext.Current.Request.Url.ToString()»ñÈ¡µ½µÄÈ´ÊÇ
http://localhost/search.aspxuser=http://csharp.xdowns.com&tag=¼¼Êõ
ÕýÈ·µÄ·½·¨ÊÇ£ºHttpContext.Current.Request.Url.PathAndQuery
1¡¢Í¨¹ýASP.NET»ñÈ¡
Èç¹û²âÊÔµÄurlµØÖ·ÊÇhttp://www.test.com/testweb/default.aspx, ½á¹ûÈçÏ£º
Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/default.aspx
Request.Path: /testweb/default.aspx
Request.PhysicalApplicationPath: E:\WWW\testwebRequest.PhysicalPath: E:\WWW\testweb\default.aspx
Request.RawUrl: /testweb/default.aspx
Request.Url.AbsolutePath: /testweb/default.aspx
Request.Url.AbsoluteUrl: http://www.test.com/testweb/default.aspx
Request.Url.Host: www.test.com
Request.Url.LocalPath: &n
Ïà¹ØÎĵµ£º
½ñÔçÓиöÍøÓÑÎʵ½ÎÒÕâÎÊÌ⣬ÒÔÇ°ÎÒ¶¼ÊÇÖ±½ÓÔÚÊý¾Ý¿âÖдæÎļþÃûµÄ£¬»¹Ã»ÓÐÊÔ¹ý´æ´¢ÕûÕÅͼƬµ½Êý¾Ý¿âÖУ¬ÉÏÍøËÑË÷ÁËһϣ¬×Ô¼ºÓÖ²âÊÔÁËÒ»·¬£¬´úÂëÈçÏ£º
½¨Á¢±£´æͼƬµÄ±íµÄSQLÓï¾ä£º
Sql´úÂë < width="14" height="15" src="javascripts/syntaxhighlighter/clipboard_new.swf" pluginspage="http://w ......
asp.netÖе¼³öExeclµÄ·½·¨£º
ÔÚasp.netÖе¼³öExeclÓÐÁ½ÖÖ·½·¨£¬Ò»ÖÖÊǽ«µ¼³öµÄÎļþ´æ·ÅÔÚ·þÎñÆ÷ij¸öÎļþ¼ÐÏÂÃ棬Ȼºó½«ÎļþµØÖ·Êä³öÔÚä¯ÀÀÆ÷ÉÏ£»Ò»ÖÖÊǽ«ÎļþÖ±½Ó½«ÎļþÊä³öÁ÷д¸øä¯ÀÀÆ÷¡£ÔÚResponseÊä³öʱ£¬t·Ö¸ôµÄÊý¾Ý£¬µ¼³öexeclʱ£¬µÈ¼ÛÓÚ·ÖÁУ¬nµÈ¼ÛÓÚ»»ÐС£
1¡¢½«Õû¸öhtmlÈ«²¿Êä³öexecl
´Ë·¨½«htmlÖÐËùÓеÄÄÚÈÝ£ ......
֮ǰÓõÄÔÚÏß±à¼Æ÷ÊÇDotNetTextBox £¬²¢ÇÒÔøÒ»¶È¾õµÃËüÒ쳣ǿ´ó£¬Èç¿ÉÒÔ¸øÉÏ´«µÄͼƬ¼ÓÎÄ×Öˮӡ»òÕßͼƬˮӡ£¬µ«ºóÀ´·¢ÏÖÆäÉÏ´«µÄͼƬ²»ÈÝÒ×¹ÜÀí£¬¶¼¼·ÔÚÒ»¸öÎļþ¼ÐÀïÃ棨Ãâ·Ñ°æ£¬¸¶·Ñ°æºÃÏñ¿ÉÒÔ·ÖÎļþ¼ÐÉÏ´«±£´æͼƬ£©£¬²¢ÇÒ¶ÎÊ׿ոñ×ܲ»ÊÇËù¼û¼´ËùµÃ£¬ÎÒ±à¼Ê±¿ÕÁËÁ½¸ö×Ö·ûµÄλÖ㬵½ÁËǰ̨ҳÃæµÄʱºòÖ»ÓÐÒ»¸ö×Ö·û£¬ËùÒÔ ......
Ò»£¬Ç°ÑÔ
CookiesÏë±ØËùÓÐÈ˶¼Á˽⣬ µ«ÊÇδ±ØËùÓÐÈ˶¼¾«Í¨¡£±¾ÎĽ²½âÁËCookiesµÄ¸÷·½Ãæ֪ʶ£¬ ²¢ÇÒÌá³öÀ´ÁË×î¼Ñʵ¼ù¡£ÕâÊDZÊÕßÔÚÈÕ³£¹¤×÷ÖеĻýÀۺͳÁµí¡£
¶þ£¬»ù´¡ÖªÊ¶
1.ʲôÊÇCookies
Cookie ÊÇһС¶ÎÎı¾ÐÅÏ¢£¬°éËæ×ÅÓû§ÇëÇóºÍÒ³ÃæÔÚ Web ·þÎñÆ÷ºÍä¯ÀÀÆ÷Ö®¼ä´«µÝ¡£Cookie °üº¬Ã¿´ÎÓû§·ÃÎÊÕ¾µãʱ Web Ó¦ÓóÌÐò¶¼¿ ......
ÔÚGlobal.asaxÆô¶¯Ò»ÌõÏ߳̾ÍokÁË£¬ÏÂÃæÊÇÆô¶¯Ï̶߳¨Ê±Ð´ÎļþµÄÀý×Ó
ÔÚGlobal.asax
C# code:
<%@ Application Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Threading" %>
<script runat="server">
string LogPath;  ......