asp.netÎļþÉÏ´«´úÂë\Êý¾Ý¿âÇÉÃîÁ¬½Ó
public class Up_Loadcs
{
public string[] Resup={"ÉÏ´«Ê§°Ü»òÖ¸¶¨µÄÎļþ²»´æÔÚ","ͼƬ´óÓÚ10K£¬ÖØÐ´«Í¼Æ¬£¡","¸ñʽ²»¶Ô£¬ÏÞÖÆÉÏ´«£¨Ö»ÔÊÐígif/jpg¸ñʽÎļþ£©£¡","ÉÏ´«³É¹¦£¡"};
public string s = string.Empty;
public string Up(System.Web.UI.HtmlControls.HtmlInputFile File2,string Pa)
{
//
// TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
//
if (File2.PostedFile.ContentLength.ToString() == "0")
{
return "0";
}
else
{
//»ñÈ¡ÎļþÃû³Æ
string ss ;
ss =System.DateTime.Now.ToString().Replace("-","").Replace(" ","").Replace(":","")+Path.GetExtension(File2.PostedFile.FileName);
if (File2.PostedFile.ContentLength/1024>10)
{return "1";}
else
{
string ty=File2.PostedFile.ContentType;
if (ty=="image/gif"||ty=="image/pjpeg")
{
File2.PostedFile.SaveAs(System.Web.HttpContext.Current.Server.MapPath(Pa) + ss);
s= ss;
Ïà¹ØÎĵµ£º
If you come to ASP.NET MVC from a purely ASP.NET Web Forms background, one of the first things you are likely to notice is that all those nice easy Server Controls have disappeared. One of those is the FileUpload, and its absence seems to cause a few problems. This article looks at how to upload f ......
Ò»¡£ ASP.NETµÄÌØÉ«ÓëÓÅÊÆ
(1)Óëä¯ÀÀÆ÷ÎÞ¹Ø
(2)·½±ãÉèÖöϵã
(3)±àÒëºóÖ´ÐУ¬ÔËÐÐЧ¹û¸ß
(4)·á¸»µÄ¿Ø¼þ¿â
(5)´úÂëºóÖã¬Ê¹´úÂë¸üÇåÎú
¶þ¡£´´½¨ASP.NET³ÌÐò
´ò¿ªVisual Studio£¬Ñ¡Ôñ“Îļþ → н¨ → ÍøÕ¾” ÃüÁÎÒÃÇн¨ÍøÕ¾Ê±²»Ò»¶¨ÐèÒªÖ¸¶¨ÍøÕ¾Â·¾¶£¬Ö±½ÓÖ¸¶¨Îļþ·¾¶ ......
Ó¦¸ÃÊÇ£ºÔÚÏîʱÏ£¬µã»÷swf×ÊÁÏÓʼþ-£¬ÊôÐÔÀïÍ·ÓУºBuildActionÑ¡ÏȡÉáǶÈë
http://www.lan27.com/Article/200706/1771.htm
ÒªÔÚÄãµÄÒýÊö³ÌÐòÖÐǶÈë×ÊÁÏ£¬Ö»ÐèÒª°´Ï²¿µÄ·½·¨²Ù×÷¼´¿É£º
Ò»£¬ÔÚ×ÊÔ´¹ÜÀíÆ÷ÀïÑ¡ººÓïÑÔ¼þ
¶þ£¬°´×¡Êó±ê×ó¼ü£¬Íϵ½¹¤³Ì×ÊÁÏÉÏ£¬ËÉ¿ªÊó±ê×ó¼ü¡£
Èý£¬ÔÚÍϷŵÄ×ÊÁÏÉϵãÊó±êÓÒ¼ü£¬Ñ¡“Ê ......
Èç¹û¶Ô΢ÐͼÆËã»úÓ²¼þϵͳÓÐ×ã¹»µÄÁ˽⣬ÄÇôÎÒÃǶÔÓÚCacheÕâ¸öÃû´ÊÒ»¶¨ÊǶúÊìÄÜÏêµÄ¡£ÔÚCPUÒÔ¼°Ö÷°åµÄоƬÖУ¬¶¼ÒýÈëÁËÕâÖÖÃûΪ¸ßËÙ»º³å´æ´¢Æ÷£¨Cache£©µÄ¼¼Êõ¡£ÒòΪCacheµÄ´æÈ¡ËٶȱÈÄÚ´æ¿ì£¬Òò¶øÒýÈëCacheÄܹ»ÓÐЧµÄ½â¾öCPUÓëÄÚ´æÖ®¼äµÄËٶȲ»Æ¥ÅäÎÊÌâ¡£Ó²¼þϵͳ¿ÉÒÔÀûÓÃCache´æ´¢CPU·ÃÎʸÅÂʸߵÄÄÇЩÊý¾Ý£¬µ±CPUÐèÒª· ......