Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÏîÄ¿

[תÔØ]ÈçºÎ´ò¿ª±ðÈ˵ÄASP.netÏîÄ¿
ÈçºÎ´ò¿ª±ðÈ˵ÄASP.netÏîÄ¿2006-2-24 21:51:00
  £¨1£©½«ÏîÄ¿Îļþ¼Ð¿½±´µ½Äã»úÆ÷µÄwwwrootĿ¼
   £¨2£©ÔÚIIS½¨Á¢Ò»¸öÃû³ÆΪWebApplicationµÄÐéÄâĿ¼£¬Ö÷Ŀ¼É趨Ϊ C:\Inetpub\wwwroot            ......

ASP.Net Ò³Ã滺´æƬ¶ÎʹÓü¼ÇÉ

Ò³Ã滺´æʹÓÃOutputCacheÖ¸Áî¡£ÆäÖÐDurationºÍVaryByParamÌØÐÔÊDZØÐëµÄ¡£ Location¿ØÖÆÒ³Ã滺´æµÄλÖÃLocationº¬ÒåAnyĬÈÏÖµ¡£Òâζ×ÅÒ³ÃæµÄÊä³ö¿ÉÒÔ»º´æÔÚ¿Í»§¶Ëä¯ÀÀÆ÷£¬»º´æÔÚÈκÎ"ÏÂÓÎ"µÄ¿Í»§¶Ë£¨Èç´úÀí·þÎñÆ÷£©£¬»ò»º´æÔÚWeb·þÎñÆ÷±¾ÉíClientÖ¸Ã÷Êä³ö»º´æÖ»ÄÜ´æ´¢ÔÚ·¢³öÇëÇóµÄ¿Í»§¶Ë£¨¼´ä¯ÀÀÆ÷£©µÄ±¾µØ»º´æÖÐDownstreamÖ ......

asp.netÐÔÄÜÓÅ»¯µÄ¼¸¸ö·½Ãæ

c#£¨»òvb.net£©³ÌÐò¸Ä½ø
1¡¢Ê¹ÓÃÖµÀàÐ͵ÄToString·½·¨
¡¡¡¡ÔÚÁ¬½Ó×Ö·û´®Ê±£¬¾­³£Ê¹ÓÃ"+"ºÅÖ±½Ó½«Êý×ÖÌí¼Óµ½×Ö·û´®ÖС£ÕâÖÖ·½·¨ËäÈ»¼òµ¥£¬Ò²¿ÉÒԵõ½ÕýÈ·½á¹û£¬µ«ÊÇÓÉÓÚÉæ¼°µ½²»Í¬µÄÊý¾ÝÀàÐÍ£¬Êý×ÖÐèҪͨ¹ý×°Ïä²Ù×÷ת»¯ÎªÒýÓÃÀàÐͲſÉÒÔÌí¼Óµ½×Ö·û´®ÖС£µ«ÊÇ×°Ïä²Ù×÷¶ÔÐÔÄÜÓ°Ïì½Ï´ó£¬ÒòΪÔÚ½øÐÐÕâÀà´¦Àíʱ£¬½«ÔÚÍйܶÑÖÐ ......

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Ó¦ÓóÌÐòÉú´æÖÜÆÚ̸Æð

  ²»Öª²»¾õ¹¤×÷ÒѾ­Á½Äê¶àÁË£¬Ò»Ö±Ïë°Ñ¹ýÈ¥µÄµãµãµÎµÎ»ýÀ۵ľ­ÑéдÏÂÀ´£¬µ«ÊÇÒ»Ö±ÄÑÒÔÍê³É£¬Ò»ÊÇʱ¼äµÄÏÞÖÆ£¬ÔÙÊÇËùÒԵö«Î÷»¹ÊDZȽÏÔÓÂÒ£¬Ò»Ê±ÄÑÒÔÕûÀí¡£ÏÂÃæ¾Í´ÓASP.NETÓ¦ÓóÌÐòÉú´æÖÜÆÚ¿ªÊ¼Ì¸Æð£¬Ö÷ÒªÊÇÒÔ´ËΪһ¸ö¿ªÍ·£¬ÀϲûÊö¸öÈ˵ÄһЩ¾­Ñé¾­Ñé̸֮ºÍ¶Ô²Î¿¼Ò»Ð©×ÊÁϵÄÀí½â¡£
  Ê×ÏÈ£¬ÎÊÌâÒ»£ºÎÒÃÇ´ò¿ªÒ»¸öÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ