asp.net ͼƬÉÏ´«
protected void Button1_Click(object sender, EventArgs e)
{
string fullName = this.File1.PostedFile.FileName;//»ñÈ¡ÉÏ´«ÎļþµÄȫ·¾¶
string size = this.File1.PostedFile.ContentLength.ToString();//»ñÈ¡ÎļþÉÏ´«µÄ´óС
string fileName = fullName.Substring(fullName.LastIndexOf("\\")+1); //»ñÈ¡ÉÏ´«ÎļþµÄÎļþÃû
string type = fullName.Substring(fullName.LastIndexOf(".")+1);//»ñÈ¡ÎļþÉÏ´«¸ñʽ
if (type == "jpg" || type == "bmp" || type == "gif" || type == "ico")
{
this.File1.PostedFile.SaveAs(Server.MapPath("upload") + "\\" + fileName);//½«Í¼Æ¬ÉÏ´«µ½¸ÃÏîÄ¿ÖеÄuploadÎļþ¼ÐÏÂ
this.Imp.Visible = true;
this.Imp.ImageUrl = "upload/" + fileName;//ÏÔʾͼƬ
}
else
{
Response.Write("<script language='javascript'>alert('ÄãÉÏ´«µÄͼƬ¸ñʽÓдíÎó£¡')</script>");
}
}
Ïà¹ØÎĵµ£º
ÈçºÎͨ¹ýASP.NETÀ´ÏÂÔØÎļþ£¬Õâ¸öÎÊÌâÎÒÃǾ³£Óöµ½£¬°Ñ³£Óõķ½·¨×ܽᵽһÆð£¬Ñ§Ï°Ñ§Ï°¡£µ±ÎÒÃÇÒªÈÃÓû§ÏÂÔØÒ»¸öÎļþ£¬×î¼òµ¥µÄ·½Ê½ÊÇͨ¹ýResponse.RedirectÖ¸Á
Response.Redirect("test.doc")
Äú¿ÉÒÔ°ÑÉÏÃæÕâÐÐÖ¸Áî·ÅÔÚButtonµÄClickʼþµ±ÖУ¬µ±Óû§µã»÷°´Å¥Ö®ºó£¬ÍøÒ³¾Í»á±»×ªÖ·µ½¸Ãwordµµ£¬Ôì³ÉÏÂÔصÄЧ¹û¡ ......
¶ÔÓÚasp.net µÄExcelµ¼³ö£¬ÓжàÖÖ·½·¨£¬µ½Ä¿Ç°£¬¸öÈËÈÏΪ£¬ÀûÓÃmyxlsµ¼³öExcel»¹ÊDZȽϺÃÓõģ¬¿ÉÒԺܺõÄÉèÖÃExcelµÄ¸ñʽ¡£¡£¡£
ʹÓúܷ½±ã£¬ÏÂÔØorg.in2bits.MyXls.dll£¬ÒýÈëÃüÃû¿Õ¼ä¼´¿É
ÏÂÃæÊÇÒ»¸öʹÓôúÂëʾÀý£º
private void ExcelExport(IList< LineLossInfo > lossListExcel)
&nb ......
ÍøÕ¾¾³£ÏÔʾ¹ã¸æ»òÑûÇëÓû§·ÃÎÊÆäËûÕ¾µãµÄÀàËƶ¯Ì¬ÄÚÈÝ¡£ASP.NET ÌṩµÄ AdRotator ¿Ø¼þ¿É¼ò»¯´ËÈÎÎñ¡£AdRotator ¿Ø¼þÏÔʾ±íʾ¹ã¸æµÄͼÐΣ¬¶ø¹ã¸æÊÇ´ÓÄú´´½¨µÄÁбíÖÐËæ»úÑ¡ÔñµÄ¡£È»ºó£¬¿ÉÒÔ¸ú×Ùij¸ö¹ã¸æµÄ²é¿´ÆµÂÊÒÔ¼°Óû§µ¥»÷¸Ã¹ã¸æƵÂÊ¡£
±¾ÑÝÁ·ÑÝʾÈçºÎʹÓà AdRotator ¿Ø¼þÏÔʾ¹ã¸æ£¬²¢Ìṩһ¸ö¼òµ¥·½·¨À´¸ú×Ù¹ã¸æÏì ......
ϵͳ»·¾³:
Ê×ÏȺͻúÆ÷Ó²¼þÎÞ¹Ø,ÕâÊÇVista°æµÄ½Ì³Ì,Ö»ÒªÄãµÄ»úÆ÷ÄÜÔËÐÐVista,OK,Ч¹ûÒ»Ñù.
Vista°æ±¾:Ultimate Ò²½ÐVistaÆì½¢°æ
ϵͳ״̬:È«ÐÂ,ÒÑ°²×°IIS
×¢Òâ:VistaĬÈÏÇé¿ö²¢Î´°²×°IIS,¿ÉÒÔÔÚ¿ØÖÆÃæ°åÀïÑ¡°²×°IIS,Õâ¸öÈç¹ûÓÐÎÊÌâµ¥¶ÀÁªÏµÎÒ,½ñÌì²»½²Ëü.
----------------------------------------------------- ......
ÕâÁ½Õß±¾Éí½²µÄÊDz»Í¬·½ÏòÓë½Ç¶ÈµÄÎÊÌ⣬ÔÚʵ¼ÊÓ¦ÓÃÖÐËûÃǵÄÈ·´æÔÚһЩÏàËƵÄÌص㣬ÔںܶàÊé¼®ÖÐҲûÓÐÉîÈë½²½â£¬ÒÔÖÂÓÚÔì³ÉÀ§»ó£¬ÎªÁ˸üºÃµÄÀí½âËûÃÇ£¬ÄǾÍÀ´ËµËµÇø±ð°É¡£
¡¡¡¡Ê×ÏÈN²ã½á¹¹ÊÇÒ»ÖÖÈí¼þ³éÏóµÄ²ã´Î½á¹¹£¬ÊǶԸ´ÔÓÈí¼þµÄÒ»ÖÖ×ÝÏòÇз֣¬Ã¿Ò»²ã´ÎÖÐÍê³ÉͬһÀàÐ͵IJÙ×÷£¬ÒԱ㽫¸÷ÖÖ´úÂëÒÔÆäÍê³ÉµÄʹÃü×÷ÎªÒ ......