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

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


Ïà¹ØÎĵµ£º

asp.netÌøתҳÃæµÄÈýÖÖ·½·¨±È½Ï

1¡¢ response.redirect Õâ¸öÌøתҳÃæµÄ·½·¨ÌøתµÄËٶȲ»¿ì£¬ÒòΪËüÒª×ß2¸öÀ´»Ø(2´Îpostback)£¬µ«Ëû¿ÉÒÔÌø תµ½ÈκÎÒ³Ã棬ûÓÐÕ¾µãÒ³ÃæÏÞÖÆ(¼´¿ÉÒÔÓÉÑÅ»¢Ìøµ½ÐÂÀË)£¬Í¬Ê±²»ÄÜÌø¹ýµÇ¼±£»¤¡£µ«ËÙ¶ÈÂýÊÇÆä×î´óȱÏÝ!redirectÌøת»úÖÆ£ºÊ×ÏÈÊÇ·¢ËÍÒ»¸öhttpÇëÇ󵽿ͻ§¶Ë£¬Í¨ÖªÐèÒªÌøתµ½ÐÂÒ³Ã棬Ȼºó¿Í»§¶ËÔÚ·¢ËÍÌøתÇëÇóµ½·þÎñÆ÷ ......

asp.netµÄsessionState½Úµã

web.config¹ØÓÚsessionState½ÚµãµÄÅäÖ÷½°¸£¬sessionStateÓÐËÄÖÖģʽ£ºoff,inProc,StateServer,SqlServer¡£
1¡¢offģʽ
´Ó×ÖÃæÉϾͿÉÒÔ¿´³öÕâ¸öÊǹرÕģʽ£¬Èç¹ûµ±Ç°Ò³Ãæ²»ÐèÒªsessionµÄÖµ£¬ÎªÁ˼õÉÙ·þÎñÆ÷×ÊÔ´£¬Äã¿ÉÒÔÈ¥µôSessionµÄ¿ªÏú¡£
<sessionState mode="off">»òÕßÒ³ÃæÉÏ
<%@ Page EnableSessionState= ......

ÓÃASP.NET×ö¼òÒ×¼ÆËãÆ÷ºÍ¾Å¾Å³Ë·¨±í

¼òÒ×¼ÆËãÆ÷
 
 
1.ÔÚÒ³ÃæÉÏ·ÅÈëTextBox¿Ø¼þºÍdropdownlist¿Ø¼þÒÔ¼°Button¿Ø¼þ,ÐγÉÏÂͼµÄÍâ¹Û.
 
 
 
 
 
 
 
2.ÔÚ×öºÃÒ³ÃæºóË«»÷Button¿Ø¼þ(¼´"="),дÈëÈçÏ´úÂë:
 
using System;
using System.Collections.Generic;
using System.Linq;
using System ......

asp.net¹Ø¼ü×Ö¹ýÂË

ÒòΪ¹ýÂ˹ؼü×Ö»úÖƵ½´¦¿É¼û£¬ÓÚÊÇ´ÏÃ÷µÄÍøÓѾͻáÏëµ½¸÷ÖÖ¸÷ÑùµÄ·½·¨Í»ÆÆ£¬ÀýÈ磺
¡¡¡¡1¡¢ÖÐÎÄ»áÓ÷±Ìå×ֵķ½·¨±Ü¿ª¹Ø¼ü×ÖɨÃè
¡¡¡¡2¡¢Ôڹؼü×ÖÖмä²åÈëÎÞÒâ˼µÄÌØÊâ×Ö·û£¬ÀýÈç * & # @ µÈ£¬¶øÇÒ¸öÊý¿É±ä
¡¡¡¡3¡¢Ê¹ÓÃгÒô»ò²ð×Ö·¨±ä»»¹Ø¼ü×Ö
¡¡¡¡ÔÚʵÏÖ×Ô¼ºµÄË㷨ʱҲÓÐЩÎÊÌ⣺
¡¡¡¡4¡¢Ëæ×Åʱ¼äÍÆÒÆ£¬¹Ø¼ü×ÖÁÐ±í» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ