ASP.NETÎļþÉÏ´«£¬ÎªÃ¿¸öÓû§½¨Á¢Ò»¸öÉÏ´«Ä¿Â¼
ÎļþÉÏ´«½çÃæ¼È¿ÉÒÔÓÃHtmlµÄinput file¿Ø¼þ£¬ÓÖ¿ÉÒÔÓÃFileUpload¿Ø¼þ£¬Ö»Òª½«HtmlµÄinput file¿Ø¼þ¼ÓÉÏrunat="server"£¬¾Í»á·¢ÏÖÁ½ÕߵŦÄÜÍêÈ«ÊÇһģһÑù£¬ÉÏ´«µÄ´úÂëÊǹ²Óõ쬲»ÐèÒª×öÈκθı䡣ÎÒÏë΢ÈíÔÚ½«Html¿Ø¼þ½«³É±ê×¼¿Ø¼þʱӦ¸ÃÖ»ÊǶà¼ÓÁËrunat="server"°É¡£·ÅÈëÉÏÊöÁ½ÕßµÄÈÎÒ»¿Ø¼þºó£¬Ìí¼ÓÒ»¸ö±ê×¼µÄButton°´Å¥£¨Html°´Å¥Ò²ÐУ¬²»¹ýÐèÒª¼ÓÉÏrunat="server"),Ë«»÷Button°´Å¥£¬²úÉúµã»÷ʼþ¡£ÔÚµã»÷ʼþÖÐдÈëÒÔÏ´úÂ룺
Ê×Ïȼì²éÊÇ·ñÒѾѡÁËÎļþ
if (this.myFile.PostedFile != null)
{
¼ì²éÎļþ¸ùĿ¼ÊÇ·ñ´æÔÚ£¬²»´æÔÚ¾ÍÒª´´½¨
if (!System.IO.Directory.Exists(Server.MapPath("~")+@"\photoes"))
{
System.IO.Directory.CreateDirectory(Server.MapPath("~")+@"\photoes");
}
´Ë´¦Server.MapPath("~")ÓÃÀ´±íʾÏîÄ¿¸ùĿ¼µÄÎïÀí·¾¶¡£
½ÓÏÂÀ´´´½¨Óû§Îļþ¼Ð£¬¸ù¾ÝÓû§ID´´½¨
if(!System.IO.Directory.Exists(Server.MapPath("~")+@"\photoes\"+userID))
{
System.IO.Directory.CreateDirectory(Server.MapPath("~")+@"\photoes\"+userID)
}
string orignalName = this.myFile2.PostedFile.FileName;//»ñÈ¡¿Í»§»úÉÏ´«ÎļþµÄ·¾¶
int lastdotlocation = orignalName.LastIndexOf(".");
string extendName = orignalName.Substring(lastdotlocation);//»ñÈ¡À©Õ¹Ãû
if (extendName != ".gif" && extendName != ".jpg" && extendName != ".jpeg" && extendName != ".png")
{
Response.Write("Wrong format");
Response.End();
}//¼ì²éÎļþ¸ñʽ
string newName = DateTime.Now.Millisecond.ToString() + "_" + myFile2.PostedFile.ContentLength.ToString() + extendName;//¶ÔÎļþ½øÐÐÖØÃüÃû
myFile.PostedFile.SaveAs(Server.MapPath("~") + @"\photoes\" +userID+@"\"+ newName);
}
Ïà¹ØÎĵµ£º
//²¿Êð×ÀÃæ¿ì½Ý·½Ê½*******************#region//²¿Êð×ÀÃæ¿ì½Ý·½Ê½*******************
StreamWriter sw2=System.IO.File.CreateText(Context.Parameters["des"].ToString()+"WebSetupTest.url");
stateSaver.Add("DeskQuick",Context.Parameters["des"].ToString() ......
VS2005µ÷ÊÔasp.net³ÌÐòʱ³öÏÖ----Internet Explorer ÎÞ·¨ÏÔʾ¸ÃÒ³Ãæ
ÈçͼËùʾ£º
ǰ¶Îʱ¼ä¿ÉÒÔµ÷ÊԵģ¬ËÖª×òÍíͻȻ²»ÐÐÁË£¬ÕÒÁ˺þã¬ÖÕÓÚÕÒµ½½â¾ö·½°¸¡£ÓõÄÊÇVS2005£¬Îļþϵͳ£¬ÔÚIISÀïÃæÉèÖõϰ£¬¿ÉÒÔÔËÐУ¬´úÂëûÎÊÌ⣬Êý¾Ý¿âÁ¬½ÓûÎÊÌâ¡£
·½°¸Ò»£ºÍ¨¹ýÓÒ»÷ASP.NET Development Server£¬Èçͼ£º
´ò¿ª1£¬ÔÚĬÈÏä¯ÀÀÆ ......
protected void Unite(GridView gv)
{
int i;
string LastType1;
int LastCell;
if (gv.Rows.Count > ......
asp.netÖÐÏÔʾÔÚÏßÓû§
private static System.Threading.Timer timer;
private const int interval = 1000 * 60 * 20;//¼ì²éÔÚÏßÓû§µÄ¼ä¸ôʱ¼ä
/// <summary>
/// ±ØÐèµÄÉè¼ÆÆ÷±äÁ¿¡£
/// </summary>
private System.ComponentModel.IContainer components = null;
public Global()
{
Initialize ......