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;
}
}
}
Ïà¹ØÎĵµ£º
½â¾ö°ì·¨
1.ÔÚ´úÂëÀïÃæ,°Ñδ¹Ø±ÕµÄÁ¬½Ó¹Ø±Õ
2.À©´ó¹²Ïí³Ø,·½·¨ÈçÏÂ:
½â¾ö·½·¨¿ÉÒÔÊÇÐÞ¸ÄÁ¬½Ó³ØµÄÁ¬½ÓÉú´æÆÚ,ÒòΪĬÈÏÖµÊÇ60Ãë,¼´Á¬½Ó´ÓÓ¦ÓóÌÐò±»Êͷźó¿ÉÒÔÔÚ³ØÖб£´æµÄʱ¼ä¡£
¾ßÌå²Ù×÷²½ÖèÈçÏ£º
Èç¹ûÊÇODBCµÄ»°£¬Ôò¿ÉÒÔÔÚODBC Data Source AdministratorÖÐÊÖ¶¯¸ü¸Ä£¬¸Ã³ÌÐòλÓÚ“Start”²Ëµ¥ÖеēP ......
À´ÕÒÕâƪÎÄÕµÄ,Ó¦¸Ã¶¼ÖªµÀʲô½Ð¶þ¼¶ÓòÃû°É,·Ï»°¾Í²»ËµÁË.µ«ÊÇÌÖÂÛÇ°,ÏÈÒªÃ÷°×Ò»¸ö˼ÏëÎÊÌâ.
ºÜ¶àÅóÓÑÒ»Ö±¿¼ÂDz»Çå(ÎÒÇ°¼¸ÌìÒ²Ò»Ö±¸ã²»Ã÷°×)µÄÎÊÌâÊÇ,ÎÒ¼üÈëÒ»¸öµØÖ·ºó,ÔõôÕâ¸öurl¾Í±»ÖØдÁË?
µÚÒ»²½:ÔÚä¯ÀÀÆ÷¼üÈëÁËÒ»¸öµØÖ·,±ÈÈçhttp://love.kerry.com,µã»Ø³µºó,¶¼·¢ÉúÁËʲô?
ΪÁË°ÑÎÊÌâ¼òµ¥»¯,ÎÒÀ´ÕâÑù½âÊÍ:
µÚ¶þ² ......
ǰ̨´úÂë
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width='<%=focus_width %>' height='<%=swf_height %>'>
<pa ......
asp.net ÍøÒ³´«²ÎµÄ¼¸ÖÖ³£Ó÷½Ê½
µÚÒ»ÖÖ£ºQueryString
//½«Ô´Ò³Ãæstart.aspxÖеÄlable ºÍtextboxÖеÄÄÚÈÝ´«µ½end.aspxÒ³ÃæÖÐ ²¢ÔÚÆälable ºÍtextboxÖÐÏÔʾ´«¹ýÀ´µÄÄÚÈÝ
Ô´Ò³Ãæ´úÂ룺
protected void Button1_Click(object sender, EventArgs e)
{
& ......