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

asp.net µÈ±ÈÀýÉú³ÉÉÏ´«Í¼Æ¬µÄ¸ßÖÊÁ¿ËõÂÔͼµÄ·½·¨

·½·¨1
HttpFileCollection files   = HttpContext.Current.Request.Files;
//ÎÒÉèÖõĴóС²»³¬¹ýA4Ö½µÄËõÂÔͼ
int newWidth=620;
int newHeight=880;
System.Drawing.Image img = null;
            
for(int iFile = 0; iFile < files.Count; iFile++)
{
     ///¼ì²éÎļþÀ©Õ¹Ãû×Ö
     HttpPostedFile postedFile = files[iFile];
     string fileName, fileExtension;
     fileName = System.IO.Path.GetFileName(postedFile.FileName);
     if (fileName != "")
     {
         fileExtension = System.IO.Path.GetExtension(fileName);
         string name=DateTime.Now.ToString("yyyyMMddHHmmssffffff")+iFile+fileExtension;
         string filePath=System.Web.HttpContext.Current.Request.MapPath(@"UpdatePic/") + name;
                        
         if (fileExtension.ToLower()==".jpg" || fileExtension.ToLower()==".gif" || fileExtension.ToLower()==".png")
         {
             //ͼƬ´óСÏÞÖÆÔÚ1Kµ½2MÖ®¼ä
             if(postedFile.ContentLength>=1024 && postedFile.ContentLength<=20480000 && postedFile.ContentType.ToString().ToLower().IndexOf("image") >= 0)
             {
                 img = System.Drawing.Image.fromStream(postedFile.InputStream);
       &nb


Ïà¹ØÎĵµ£º

ASP.NETÒ³Ãæ´«Öµ_µÚ¶þƪ_²éѯ×Ö·û´®

ÀýÒ»£º
+++ µÚÒ»¸öÒ³Ãæ
++ Ò³Ãæ´úÂëÈçÏ£º
<div>
 <a href="QueryString04.aspx?blog=DoooooNetooooot.blog.tianya.cn&qq=516535763">³¬Á´½Ó´«ÖµÊ¾Àý</a>
</div>
++ ºǫ́´úÂëÈçÏ£º
(ÂÔ)
+++ µÚ¶þ¸öÒ³Ãæ
++ Ò³Ãæ´úÂëÈçÏ£º
(ÂÔ)
++ ºǫ́´úÂëÈçÏ£º
protected void Page_Load( ......

ASP.NETÒ³Ãæ´«Öµ_µÚÁùƪ_Cookie

+++ Cookie01.aspxÒ³Ãæ
++ Ò³Ãæ´úÂëÈçÏ£º
<asp:TextBox ID="TextBox1" runat="server" ForeColor="Red" Width="182px">Name</asp:TextBox>
<asp:Button ID="BtnCookie" runat="server" OnClick="BtnCookie_Click" Text="BtnCookie" /><br />
++ ºǫ́´úÂëÈçÏ£º
protected void BtnCookie_Cl ......

ASP.NETÒ³Ãæ´«Öµ_µÚÆßƪ_HiddenField

+++ HiddenField01.aspxÒ³Ãæ
++ Ò³Ãæ´úÂëÈçÏ£º
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:HiddenField ID="HiddenField2" runat="server" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
++ ºǫ́´úÂ룬ÈçÏ£º
protected void Button1_C ......

ASP.NETÔÚVS2008ÖÐÈçºÎʵÏÖµ÷ÊÔ£¡~~~

µÚÒ»ÖÖÊÊÓÃÓÚûÓн¨Á¢ÐéÄâ·¾¶µÄÏîÄ¿£¬¶øÇÒÏîÄ¿Ò²²»´óµÄÇé¿öÏ£¬Ö±½Ó´ò¶Ïµã£¬Ö®ºóµã»÷F5ÔËÐС£
µÚ¶þÖÖÊÊÓÃÓÚ½¨Á¢ÐéÄâ·¾¶µÄÏîÄ¿£¬´òºÃ¶Ïµã£¬Ö®ºóÑ¡Ôñµ÷ÊÔ->¸½¼Óµ½½ø³Ì->Ñ¡Ôñaspnet_wp.exe£¬Ö®ºó´ò¿ªä¯ÀÀÆ÷£¬´ò¿ªÒ³Ã棬µ½ÓжϵãµÄµØ·½»á×Ô¶¯¸ú×Ù½øÈ¥£¡~
×¢£ºÓеIJÙ×÷ϵͳ¿ÉÄÜÕÒ²»µ½aspnet_wp.exe ¿ÉÄÜ´æÔÚccc.exeÖ®À ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ