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

ASP.NETʵÏÖ´ÓÊý¾Ý¿âÖжÁȡͼƬµÄ·½·¨

ÔÚASP.NETÖÐ,ÎÒÃÇ¿ÉÒÔÓÃÏÂÃæµÄ·½·¨ÊµÏÖ´ÓÊý¾Ý¿âÖжÁȡͼƬ²¢ÏÔʾÔÚÒ³ÃæÉÏ,·½·¨ÈçÏÂ:
      SqlConnection conn=new SqlConnection(ConfigurationSettings.AppSettings["ConnStr"]);
      String sql="SELECT  image from append where id='" + strID + "'";
      SqlCommand command=new SqlCommand(sql,conn);
 
      conn.Open();
      SqlDataReader dr=command.ExecuteReader();
      dr.Read();
      byte[] imgdata = (byte[])dr["image"];
      Response.BinaryWrite(imgdata);
      dr.Close();
      conn.Close();
ÔÚÐèÒªÏÔʾͼƬµÄµØ·½,¼ÓÉÏÕâÑùµÄ´úÂë,À´¿ØÖÆͼƬÏÔʾµÄλÖõÈÐÅÏ¢:
        <asp:Image ImageUrl="showAP.aspx?id=1"   ID="imgLogo"  Runat="server"></asp:Image>
ÕâÑù¾ÍʵÏÖÁË´ÓÊý¾Ý¿âÖжÁȡͼƬ²¢ÏÔʾµÄ¹¦ÄÜ.


Ïà¹ØÎĵµ£º

ASP.NETÒ³Ãæ¶ÔÏó

 Ò»¡¢Page Àà
      Page ÀàÓëÀ©Õ¹ÃûΪ .aspx µÄÎļþÏà¹ØÁª£»ÕâЩÎļþÔÚÔËÐÐʱ±»±àÒëΪ Page ¶ÔÏ󣬲¢±»»º´æÔÚ·þÎñÆ÷ÄÚ´æÖС£Èç¹ûÊÇʹÓôúÂëÒþ²Ø¼¼Êõ´´½¨ Web ´°ÌåÒ³£¬Çë´Ó¸ÃÀàÅÉÉú¡£
Àý£º£¨public partial class _Default : System.Web.UI.Page£©
      Page ¶ ......

ASP.NETÒ³Ãæ¶ÔÏó

   »ñÈ¡ÇëÇóµÄÒ³µÄHttpApplicationState ¶ÔÏó¡£
Ò»¡¢HttpApplicationState Àà
      ×÷ÓãºÆôÓà ASP.NET Ó¦ÓóÌÐòÖжà¸ö»á»°ºÍÇëÇóÖ®¼äµÄÈ«¾ÖÐÅÏ¢¹²Ïí¡£
      ASP.NET Ó¦ÓóÌÐòµÄ¸ÅÄÊǵ¥¸ö Web ·þÎñÆ÷ÉϵÄij¸öÐéÄâĿ¼¼°Æä×ÓĿ¼·¶Î§ÄÚµÄËùÓÐÎļþ¡¢Ò³¡ ......

Asp.net´ò°ü°²×°

 Ò»).´´½¨²¿ÊðÏîÄ¿
1. ÔÚ“Îļþ”²Ëµ¥ÉÏÖ¸Ïò“Ìí¼ÓÏîÄ¿”£¬È»ºóÑ¡Ôñ“н¨ÏîÄ¿”¡£
2. ÔÚ“Ìí¼ÓÐÂÏîÄ¿”¶Ô»°¿òÖУ¬Ñ¡Ôñ“ÏîÄ¿ÀàÐÍ”´°¸ñÖеē°²×°ºÍ²¿ÊðÏîÄ¿”£¬È»ºóÑ¡Ôñ“Ä£°å”´°¸ñÖеē°²×°ÏîÄ¿”¡£ÔÚ“Ãû³Æ”¿ò ......

[ת]ASP.NET¶àƵµÀÍøÕ¾¼Ü¹¹ÐĵÃ

asp.net¶àƵµÀÍøÕ¾¿ª·¢¼Ü¹¹Ç³Îö http://www.cnblogs.com/Kenny-Jiang/archive/2007/07/31/837900.html ±³¾°£º
        ÎÒÃÇ´ò¿ªÃÅ»§Íøվʱ£¬ÍùÍù»á¿´µ½ºÜ¶àÅÅÁнôÃܵÄƵµÀÁÐ±í£¬Èç¡°ÐÂÎÅ¡±¡¢¡°²Æ¾­¡±¡¢¡°ÓéÀÖ¡±µÈ¡£ÆµµÀΪÍøÕ¾ÌṩÁË·½±ãµÄµ¼º½¹¦ÄÜ¡£
ÄÚÈÝÃèÊö£º
&# ......

asp.net Ò³ÃæÓÒϽǵ¯³öÀàËÆQQ»òMSNµÄÏûÏ¢Ìáʾ

<HTML><HEAD>
<TITLE>ÍøÒ³ÌØЧ¹ÛÖ¹|JsCode.CN|---Ò³ÃæÓÒϽǵ¯³öÀàËÆQQ»òMSNµÄÏûÏ¢Ìáʾ</TITLE>
<SCRIPT language=JavaScript>
<!--
/**//*
**    ==================================================================================================
**&nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ