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

ASP.NETÏÂÔØÍøÕ¾ÉϵĵØÍ¼Í¼Æ¬£¨¾«£©

Ò³ÃæÖÐÒýÈ룺
using System.Net;
using System.IO;
ÏÂÃæÁ½¸ö·½·¨£¬½á¹û¶¼ÊÇÒ»Ñù£¬¶¼¿ÉÒÔÏÂÔØÍøÕ¾ÉϵÄͼƬ£»
private void Sava1()
{
string url = "http://192.234.86.15/Maplink//05/000/000/013/000/000/006.png";
WebRequest wreq = WebRequest.Create(url);
HttpWebResponse wresp = (HttpWebResponse)wreq.GetResponse();
Stream s = wresp.GetResponseStream();
System.Drawing.Image img;
img = System.Drawing.Image.fromStream(s);
img.Save("E:\\000.png", System.Drawing.Imaging.ImageFormat.Png);
MemoryStream ms = new MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
img.Dispose();
Response.ClearContent();
Response.ContentType = "image/png";
Response.BinaryWrite(ms.ToArray());
}
private void Sava2()
{
string url2 = "http://219.234.86.15/Maplink//03/000/000/004/000/000/002.png";
WebClient my = new WebClient();
byte[] mybyte;
mybyte = my.DownloadData(url2);
MemoryStream ms = new MemoryStream(mybyte);
System.Drawing.Image img;
img = System.Drawing.Image.fromStream(ms);
img.Save("E:\\001.png", System.Drawing.Imaging.ImageFormat.Png); //±£´æ
//ÏÂÃæÖ±½ÓÊä³ö
Response.ClearContent();
Response.ContentType = "image/gif";
Response.BinaryWrite(mybyte);
//Èç¹ûÊÇÕæÊµµÄͼƬµØÖ·Ö±½ÓÓÃ
my.DownloadFile(url2, "E:\\001.png"); //±£´æ
}


Ïà¹ØÎĵµ£º

ASP.NETÔËÐÐÔ­Àí¸ÅÊö


1.ASP.NETÔËÐÐÔ­Àí¸ÅÊö
¡¡¡¡ÈçÉÏͼ£¬µ±Ò»¸öhttpÇëÇó·¢Ë͹ýÀ´²¢±»IIS»úÊÕµ½Ö®ºó,IISÊ×ÏÈͨ¹ýÄãÇëÇóµÄÒ³ÃæÀàÐÍΪÆä¼ÓÔØÏàÓ¦µÄdllÎļþ£¬È»ºóÔÚ´¦Àí¹ý³ÌÖн«ÕâÌõÇëÇó·¢Ë͸øÄܹ»´¦ÀíÕâÌõÇëÇóµÄÄ£¿é,¶øÔÚASP.NETÖÐÕâ¸öÄ£¿é¾Í½Ð×öHttpHandler,ΪʲôaspxÕâÑùµÄÎļþ¿ÉÒÔ±»·þÎñÆ÷´¦Àí,ÄÇÊÇÒòΪÔÚ·þÎñÆ÷¶ËÓÐĬÈϵÄHttpHandlerרÃÅ´ ......

ASP.NET Web Developer Checklist




The following is a simple checklist you can use when building web
applications.  Much of this still applies to other technologies and can
easily be extended.  I try not to get too specific on technology or
methodology, but it is definitely leaning toward ASP.NET.
If you
......

asp.netÉú³ÉÊý×Ö¡¢×ÖÄ¸Ëæ»úÊý

 char[] constant = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', ......

ASP.NET"ÕýÔÚÖÐÖ¹Ïß³Ì"´íÎóÔ­¼°½â¾ö·½·¨

 ×î½ü×öµÄϵͳÖÐÀϳöÏÖµÄһЩÎÊÌⲻ̫Ã÷°×£¬ÔÚʹÓà Response.End¡¢Response.Redirect »ò Server.Transfer ʱ³öÏÖ ThreadAbortException £¬±¾À´ÏµÍ³ÊÇûÓÐÎÊÌâµÄ£¬ÔÚ±£´æÊý¾ÝʱҲ¿ÉÒÔÕý³££¬±¾À´Ê¹ÓÃtry-catch Óï¾äÊÇÓÃÀ´²¶»ñÒ»Òì³£Çé¿öµÄ£¬µ«ÏµÍ³Õý³££¬Àϲ¶»ñµ½ÏÂÃæµÄ¶«Î÷
##[²Ù×÷¼Ç¼]£º2010-02-23 9:25:12  Sys ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ