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

asp.netÈ¡Îļþ¼ÐÖÐËùÓÐÎļþÃû

string[] files = Directory.GetDirectories(Server.MapPath("Themes/"));
ÏÈÉùÃ÷ÁËÒ»¸ö×Ö·ûÊý×飬mapPath·½·¨µÃµ½µÄÊÇÒ»¸ö¾ø¶Ô·¾¶¡£
ÒòΪGetFiles·µ»ØµÄÊÇÒ»¸östring[]Êý×飬ËùÒÔÓà filesÀ´½ÓÊÕËü¡£
È»ºóÎÒÃÇÔÚÓÃÒ»¸öforeachÑ­»·À´±éÀúÕâ¸öÊý×飬ȡ³öËùÓÐÖµ¡£
foreach (string file in files)
{
Response.Write(Path.GetFileNameWithoutExtension(file) + "<br />");
}  


Ïà¹ØÎĵµ£º

ASP.NET½²×ù(2) ASP.NET¿Ø¼þ

2.1 ASP.net ÈëÃÅ
¡¡¡¡Í¨³£Ì¸Ò»¸öѧ¿Æ£¬ÎÒÃÇÀÏÊÇ˵£¬ËüÈëÃźܼòµ¥µÄÂASP.netÒ²ÊÇ¡£ASP.netÌá³öÒ»¸ö¸ÅÄ¾ÍÊÇÈÏΪWEBÒ³Ãæ£¬Ò²ÊÇÒ»¸ö´°Ì壬ËùÒÔ£¬Ñ§Ï°¹ýÃæÏò¶ÔÏó±à³ÌµÄVB VC BC DephiµÄÅóÓÑ£¬Ñ§ÆðÀ´¾Í¼òµ¥¶àÁË¡£
¡¡¡¡Ò»¸öASP.netÒ³ÃæµÄºó׺ÃûÊÇ".aspx"£¬ËùÒÔ£¬IISÔÚÄã°²×°ÍêASP.netʱ£¬Ò²»á°ÑDefault.aspx×÷ΪÄãµÄĬÈÏ ......

asp.net¸ù¾ÝµÇ½Ãû·ÖÅäȨÏÞ

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Text;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Sy ......

asp.net×Ô¶¨Òå´íÎóÒ³Ãæ

web.config
<customErrors mode="On" defaultRedirect="ApplicationErroy.aspx" >
<error statusCode="403" redirect="403.htm"/>
<error statusCode="404" redirect="404.htm"/>
<error statusCode= ......

asp.netĸ°åÒ³ÒýÓÃÎļþµÄ·¾¶ÎÊÌâ

1. ͼƬÎÊÌâ
·Ç³£ºÃ½â¾ö
<img runat="server" src="~/images/ad468x60.gif" alt="" />
¼ÓÉÏrunat="server" £¬Â·¾¶Ê¹Óþø¶Ô·¾¶~/»ù±¾ÉϾÍOKÁË¡£
2. CSSÎļþÒýÓÃ
<link rel="stylesheet" type="text/css" href="style.css" />
ÕâÀïÉñÆæµÄ¾ÍÊÇlinkµÄÎļþµÄhrefÊÇËæ×ű»·ÃÎÊÎļþµÄĿ¼½á¹¹×Ô¶¯µ÷Õû£¬Ëµ°×Á˾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ