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

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;
        }
    }
}


Ïà¹ØÎĵµ£º

ʵÏÖ´Óµ¯³ö´°¿ÚÖÐÑ¡ÔñÖµ (asp.net C#)

ÔÚAsp.netÖУ¬´ÓAÒ³ÃæÖе¯³öBÒ³Ãæ£¬ÔÚBÒ³ÃæÖÐÑ¡ÔñÊý¾Ýºó£¬¹Ø±Õ²¢½«Êý¾Ý¸üе½AÒ³Ãæ£¬ÊÇÒ»ÖÖ³£Óõķ½Ê½¡£Ö»ÊÇÎÒ¶ÔJavascript²»ÊìϤ£¬ËùÒÔµ·¹ÄÁËÒ»ÏÂÎ磬ÖÕÓÚÓÐÁËÒ»µã³É¼¨¡£
¡¡¡¡²âÊÔÏîÄ¿ÓÐÁ½¸öÒ³Ãæ£ºDefault.aspx¼°Default2.aspx£¬ÔÚDefault.aspxÒ³ÃæÉÏÓÐÒ»¸öTextBox1¼°Ò»¸öButton1£¬Button1ÓÃÓÚ´¥·¢Default2.aspx£¬TextBox ......

asp.netµÄ³£ÓôúÂë

 
0.ÓÃsessionÅжÏÊÇ·ñµÇ½
if(Session["login"] == null)
   {
    Response.Redirect("error.aspx");
   }
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</s ......

asp.net ÈçºÎʵÏÖÓÊÏäÑéÖ¤

Ê×ÏÈÊý¾Ý¿â±íµÄÉè¼Æµ±ÖÐ
×¢²áÓû§±íÓ¦¸Ã°üº¬Ò»¸öÊÇ·ñ¼¤»îµÄ×ֶΣ¬Í¨¹ý´Ë×Ö¶ÎÀ´ÅжÏÊÇ·ñ¼¤»î¡£ºÍÒ»¸ö¼¤»îkeyµÄ×ֶΣ¬´Ë×Ö¶ÎÓÃÓÚ·ÅÖü¤»îÂë
³ÌÐò·½Ãæ
ÔÚÓû§×¢²áµÄʱºòËæ»úÉú³ÉÒ»¸ö¼¤»îÂë(ÇëÈ·±£¼¤»îÂëΨһ)£¬°ÑÓû§ÐÅÏ¢¼°¼¤»îÂë²åÈëµ½Êý¾Ý±íÖС£
ͨ¹ý·¢ÓʼþµÄ·½Ê½Ïò×¢²áÓû§ÌṩµÄÓÊÏä·¢Ò»·â°üº¬¼¤»îÁ´½ÓºÍ¸Õ¸ÕÉú³ÉµÄ¼¤» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ