asp.netÊä³ö png ͼÏñ£¬
asp.netÊä³ö png 32λ ͼÏñ£¬´øÍ¸Ã÷alpha¡£
// pngtest.htm
<html>
<head></head>
<body bgColor="gray">
<img src="png.ashx" />
</body>
</html>
// png.ashx
<%@ WebHandler Language="C#" Class="Png" %>
using System.Web;
public class Png : IHttpHandler {
public void ProcessRequest (HttpContext context) {
HttpResponse Response = context.Response;
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(392, 72);
System.Drawing.Graphics g = System.Drawing.Graphics.fromImage(bmp);
g.Clear(System.Drawing.Color.Gray);
g.DrawString("This is 32bit png.", new System.Drawing.Font("verdana bold", 14f), System.Drawing.Brushes.HotPink, 0f, 0f);
g.Dispose();
bmp.MakeTransparent(System.Drawing.Color.Gray);
System.IO.MemoryStream MemStream = new System.IO.MemoryStream();
bmp.Save(MemStream, System.Drawing.Imaging.ImageFormat.Png);
bmp.Dispose();
Response.Clear();
Response.ContentType = "image/PNG";
MemStream.WriteTo(Response.OutputStream);
MemStream.Close();
}
public bool IsReusable {
get {
return false;
}
}
}
Ïà¹ØÎĵµ£º
ÓÐʱºòÓÃiisÅäÖõÄÍøÕ¾£¬×ÜÊdzöÏÖÎÞ·¨ÏÔʾ¸ÃÒ³µÄÌáʾ
³öÏÖÕâÖÖÎÊÌâµÄÔÒòÓжàÖÖ£¬¾ßÌåÊÇÄÄÖÖ£¬×ÜÒ²¸ã²»´óÃ÷°×£¬²»¹ý£¬Ã¿´ÎÈ¥½â¾öÕâ¸öÎÊÌâµÄʱʱºò£¬
×Ü»áÏëµ½Õâ¸ö·½·¨£º
¾ÍÊÇ.net ÖØÐÂ×¢²áiis
²Ù×÷ÊÇ£º
1.ÔÚ“¿ªÊ¼”--“ÔËÐДÖÐÃüÁîÌáʾ·ûÏ ÊäÈë“cd C:\WINDOWS\Microsoft.NET\Framework\ ......
Ò³Ãæ»º´æÊ¹ÓÃOutputCacheÖ¸Áî¡£ÆäÖÐDurationºÍVaryByParamÌØÐÔÊDZØÐëµÄ¡£
Location¿ØÖÆÒ³Ã滺´æµÄλÖÃLocationº¬ÒåAnyĬÈÏÖµ¡£Òâζ×ÅÒ³ÃæµÄÊä³ö¿ÉÒÔ»º´æÔÚ¿Í»§¶Ëä¯ÀÀÆ÷£¬»º´æÔÚÈκÎ"ÏÂÓÎ"µÄ¿Í»§¶Ë£¨Èç´úÀí·þÎñÆ÷£©£¬»ò»º´æÔÚWeb·þÎñÆ÷±¾ÉíClientÖ¸Ã÷Êä³ö»º´æÖ»ÄÜ´æ´¢ÔÚ·¢³öÇëÇóµÄ¿Í»§¶Ë£¨¼´ä¯ÀÀÆ÷£©µÄ±¾µØ»º´æÖÐDownstreamÖ ......
ÕâÀï²»ÊÇÖ¸µ÷Óüòµ¥µÄ PageMethod£¬ÒòΪ¾²Ì¬·½·¨ÊDz»ÄܲÙ×÷µ±Ç°Ò³ÃæµÄ¿Ø¼þµÄ£¬ËùÒÔ¾²Ì¬µÄ PageMethod ×÷Óþ͸úÆÕͨµÄ WebService Ò»Ñù£¬±È½Ï¾ÖÏÞ¡£
ÄÇô£¬µ÷ÓÃÒ»°ãµÄ·þÎñÆ÷¶Ë·½·¨£¬Æäʵ¾ÍÊÇ·¢ÆðÒ»¸öÒì²½»Øµ÷¡£×î¼òµ¥µÄʵÏÖ°ì·¨£¬ÊÇͨ¹ý UpdatePanel À´×ö¡£
Ê×Ïȶ¨ÒåÒ»¸öÒþ²ØµÄ LinkButton£¬ÔÚÆä´¦ÀíʼþÖУ¬È¥µ÷ÓÃÎÒÃÇÒªÖ ......
ÔÚasp.netÖÐʹÓÃfckeditor ,Ò³ÃæÊ¹ÓÃthemʱ,ͨ¹ý±à¼Æ÷ÉÏ´«Í¼Æ¬»òÎļþÌáʾ
"Using themed css files requires a header control on the page"
½â¾ö°ì·¨:
ÔÚfckeditorµÄweb.configÎļþÖÐ×öÈçÏÂÐÞ¸Ä
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<pages styleSheet ......