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

asp.net ÊüÕÖ²ãÉÏ´«Í¼Æ¬(¶þ½øÖÆ),²¢ÏÔʾ¶þ½øÖÆͼƬ

1.ÉÏ´«¹¦ÄÜ
JS¼ì²é
function hideUpImg()//¹Ø±Õ²ã£¬²¢ÉÏ´«Í¼Æ¬
{
var v=document.getElementById("upImg").value;
var after=v.substring(v.lastIndexOf('.')).toLowerCase();
alert(after);
if(v.length<=0)
{
alert("ÇëÑ¡ÔñͼƬ");
return false;
}
if(after==".jpg"||after==".gif"||after==".png")
{
return true;
}
alert("ͼƬֻÄÜÊÇ.jpg .gif .png¸ñʽ");
document.getElementById("upImg").outerHTML=document.getElementById("upImg").outerHTML;
return false;
}
Ò³Ãæ´úÂ룺
<div id="myDiv" style="display: none;" mce_style="display: none;" class="divshowbottom"> </div>
<div id="upLoadImg" style="top: 200px;left: 300px;display: none;" class="divshowwork">
<div style="width: 100%; height: 20px;background-color: #FF0000; cursor: move;">ÉÏ´«Í¼Æ¬</div>
<p style="text-align: center;" mce_style="text-align: center;">ÇëÉÏ´«Í¼Æ¬</p>
<asp:FileUpload ID="upImg" runat="server" />
<asp:Label ID="lblState" runat="server" ></asp:Label>
<br /><asp:Button ID="btnUpImg" runat="server" Text="ÉÏ´«" OnClick="btnUpImg_Click" /> <input type="button" value="È¡Ïû" id="button_2" />
</div>
ºǫ́´úÂë:
Stream stream = this.upImg.PostedFile.InputStream;
byte[] photo = new byte[upImg.PostedFile.ContentLength];
stream.Read(photo, 0, upImg.PostedFile.ContentLength);

ItemMaster im = new ItemMaster();
im.ItemUid =Convert.ToInt32(s.Split('|')[1]);
im.Drawing = photo;
int upd = ItemMasterBIZ.UpdItemMasterByImg(im);
stream.Cl


Ïà¹ØÎĵµ£º

asp.net C# ·¢ËÍ Óʼþ ºÍ ¸½¼þ ´úÂë

˵µ½·¢ËÍÓʼþ·¢ËÍ£¬ÏÈÌáÒ»ÏÂSMTP(ºÇºÇ£¬¸ßÊÖ¾ÍÌø¹ýÕâÒ»¶Î°É£¡)¡£ SMTPµÄÈ«³ÆÊÇ“Simple Mail Transfer Protocol”£¬¼´¼òµ¥Óʼþ´«ÊäЭÒé¡£ËüÊÇÒ»×éÓÃÓÚ´ÓÔ´µØÖ·µ½Ä¿µÄµØÖ·´«ÊäÓʼþµÄ¹æ·¶£¬Í¨¹ýËüÀ´¿ØÖÆÓʼþµÄÖÐת·½Ê½¡£SMTP ЭÒéÊôÓÚ TCP/IP ЭÒé´Ø£¬Ëü°ïÖúÿ̨¼ÆËã»úÔÚ·¢ËÍ»òÖÐתÐżþʱÕÒµ½ÏÂÒ»¸öÄ¿µÄµØ¡£SMTP ·þ ......

Asp.netÖ® ÀàºÍ½á¹¹µÄÇø±ð

1¡¢ÀàÊÇÒýÓÃÀàÐÍ£¬½á¹¹ÔòÊÇÖµÀàÐÍ¡£Òò´Ë½á¹¹ÊÇ·ÅÔÚÕ»£¨Stack£©ÀÀàÔò½ö½öÊǽ«ÒýÓõØÖ·´æ·ÅÔÚÕ»À¶ø¾ßÌåµÄÖµÔò´æ·ÅÔڶѣ¨heap£©Àï¡£
2¡¢¾ÝµÚ1µã¿ÉÒԵóö½áÂÛ£¬ÄǾÍÊÇÀà¶ÔÏóͨ³£ÓÃÀ´´«µÝ´óÊý¾Ý£¬¶ø½á¹¹¶ÔÏóÔòÓÃÀ´´«µÝСÊý¾Ý¡£
3¡¢Àà¿ÉÒԼ̳кͱ»¼Ì³Ð£¬¶ø½á¹¹Ôò²»Ö§³Ö¡£µ«½á¹¹ºÍÀàÒ»Ñù¿ÉÒԼ̳Ð×Ô½Ó¿Ú¡£
4¡¢½á¹¹¶ÔÏó²»ÄÜ ......

asp.netÔÚÏßÈËÊýͳ¼Æ

ÓÐÈËÒ²ÎÊÁ˸öÔÚÏßͳ¼ÆµÄÎÊÌ⣬ÎҵļûÒâÊÇÕâÑùµÄ£º  
  ÔÚApplication_StartʼþÖмÓÈëÒÔÏ´úÂ룺  
  Application.Lock();  
  Application.["UserCount"]=0;  
  Application.Unlock();  
   
  Session_Startʼ ......

asp.netÑéÖ¤¿Ø¼þ²»Æð×÷ÓõĽâ¾ö°ì·¨

×î½üд³ÌÐòÒ»Ö±³öÎÊÌ⣬ÒÔÇ°Ò»¸öÕ¾Èý¼¸Ìì¾ÍÇáËɸ㶨£¬ÏÖÔÚÒ»¸öÄ£¿é¾­³£¸ã°ëÌ죬NND
ÏÂÎ翪·¢¿áÒ×»¯×±Æ·É̳Ç(http://www.koyee.net)Ò»¸ö±íµ¥Ìá½»¹¦ÄÜÄ£¿é£¬±¾µØÈκÎÎÊÌⶼûÓÐÁË£¬´«µ½·þÎñÆ÷Éϱ¾ÒÔΪûÊÂÁË£¬ºóÀ´Ò»¼ì²éËùÓеÄÑéÖ¤¿Ø¼þ¶¼²»Æð×÷ÓÃÁË£¬Ö±½Ó¶¼Ìá½»¹ýÈ¥ÁË£¬ÓôÃÆ£¬Ô­ÒÔΪ³ÌÐò±»¸Ä´íÁË£¬¼ì²é±¾µØ»¹ÊÇûÈκÎÎÊÌ⣬¼ ......

ASP.NETµÄÎå´óÊý¾Ý¿Ø¼þdz̸

»¶Ó­½øÈë.NETÉçÇøÂÛ̳£¬Óë200Íò¼¼ÊõÈËÔ±»¥¶¯½»Á÷ >>½øÈë
ASP.NET Êý¾Ý¿Ø¼þ:GridView,DataList,Repeater ,DetailsView,FormView¡£
ASP.NET Êý¾Ý¿Ø¼þ×ÛÊö£º
1.Ç°3¸öÓÃÓÚ³ÊÏÖ¶àÌõ¼Ç¼,ºóÃæ2¸öÓÃÓÚ³ÊÏÖµ¥ÌõÊý¾ÝÃ÷ϸ,¼´³£ÓõļǼÃ÷ϸ¡£
2.GridViewºÍDetailsView¿Ø¼þµÄ²¼¾Ö¹Ì¶¨,×Ô¶¨ÒåÊý¾ÝÏÔʾµÄ²¼¾Ö¹¦ÄÜÓÐÏÞ,Ò»°ã ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ