ASP.NETÖдæȡͼƬµ½Êý¾Ý¿âµÄʾÀý
//¿ª·¢»·¾³£ºWindow 2000¡¢SQLServer2000¡¢.Net Framework SDKÕýʽ°æ
//¿ª·¢ÓïÑÔ£ºC#¡¢ASP.Net
//¼ò½é£ºÊý¾Ý¿âÖÐͼƬ´æÐî¼°¶ÁÈ¡
//×÷Õߣºengine
/*
˵Ã÷£ºÔÚASPÖУ¬ÎÒÃÇÓÃRequest.TotalBytes¡¢Request.BinaryRead()À´ÉÏ´«Í¼Æ¬£¬Õâ¸ö¿É¶ñµÄBinaryRead()·½·¨·Ç³£±¿£¬µ¥¸öÎļþÉÏ´«µ¹Ã»Ê²Ã´´óÊ£¬µ¥Èç¹û¶à¸öͼƬÉÏר¿É¾Í»¨´óÆøÁ¦ÁË…£¡¶øÏÖÔÚASP.NetÖн«»á°Ñ½â¾öÒÔÇ°ASPÖÐÎļþÉÏ´«µÄÖÖÖÖÎÊÌ⣬ʹÄãÔÚASP.NetÖÐÇáÇáËÉËÉ¿ª·¢³ö¹¦ÄÜÇ¿´óµÄÉÏ´«³ÌÐò£¬ÏÂÃæ´ó¼Ò¿´¿´Àý×ÓÀ²¡£
*/
//×¢Ò⣺ÓÉÓÚ×÷ÕßˮƽÓÐÏÞ£¬´íÎóÊÇÄÑÃâµÄ£¬Èç·¢ÏÖ´íÎóÇëÖ¸½Ì
/*
Ê×ÏÈÔÚSQL ServerÖн¨Á¢Ò»¸öͼƬ´æ´¢µÄÊý¿â±í£¬ImageData ColumnΪͼÏó¶þ½øÖÆÊý¾Ý´¢´æ×ֶΣ¬ImageContentType ColumnΪͼÏóÎļþÀàÐͼǼ×ֶΣ¬ImageDescription ColumnΪ´¢ÐîͼÏóÎļþ˵Ã÷×Ö¶Î,ImageSize ColumnΪ´¢´æͼÏóÎļþ³¤¶È×ֶΣ¬½á¹¹ÈçÏ£º
CREATE TABLE (
IDENTITY (1, 1) NOT NULL ,
NULL ,
(50) COLLATE Chinese_PRC_CI_AS NULL ,
(200) COLLATE Chinese_PRC_CI_AS NULL ,
NULL
) ON
*/
//UpLoadImage.aspx³ÌÐòÄÚÈÝÈçÏ£º
<%@ Page Inherits="UploadImage.UploadImage" SRC="UpLoadImage.cs" Language="C#"%>
<HTML><title>ÉÏ´«Í¼Æ¬</title>
<BODY bgcolor="#FFFFFF">
<FORM ENCTYPE="multipart/form-data" RUNAT="server" ID="Form1">
<TABLE RUNAT="server" WIDTH="700" ALIGN="left" ID="Table1" cellpadding="0" cellspacing="0" border="0">
<TR>
<TD>ÉÏ´«Í¼Æ¬(Ñ¡ÔñÄãÒªÉÏ´«µÄͼƬ)</TD>
<TD>
<INPUT TYPE="file" ID="UP_FILE" RUNAT="server" STYLE="Width:320" ACCEPT="text/*" NAME="UP_FILE">
</TD>
</TR>
<TR>
<TD>
Îļþ˵Ã÷(Ìí¼ÓÉÏ´«Í¼Æ¬ËµÃ÷£¬È磺×÷Õß¡¢³ö´¦)
</TD>
<TD>
<asp:TextBox RUNAT="server" WIDTH="239" ID="txtDescript
Ïà¹ØÎĵµ£º
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
6. Ö»Òª¿ÉÄÜ£¬¾Í»º´æÊý¾ÝºÍÒ³Êä³ö ¡¡¡¡
ASP.NET ÌṩÁËһЩ¼òµ¥µÄ»úÖÆ£¬ËüÃÇ»áÔÚ²»ÐèҪΪÿ¸öÒ³ÇëÇó¶¯Ì¬¼ÆËãÒ³Êä³ö»òÊý¾Ýʱ»º´æÕâЩҳÊä³ö»òÊý¾Ý¡£ÁíÍ⣬ͨ¹ýÉè¼ÆÒª½øÐлº´æµÄÒ³ºÍÊý¾ÝÇëÇó(ÌرðÊÇÔÚÕ¾µãÖÐÔ¤ÆÚ½«ÓнϴóͨѶÁ¿µÄÇøÓò)£¬¿ÉÒÔÓÅ»¯ÕâЩҳµÄÐÔÄÜ¡£Óë .NET Framework µÄÈκΠWeb ´°Ì幦ÄÜÏà±È£¬Êʵ±µØÊ ......
16. Êʵ±µØʹÓù«¹²ÓïÑÔÔËÐпâµÄÀ¬»ø»ØÊÕÆ÷ºÍ×Ô¶¯ÄÚ´æ¹ÜÀí ¡¡¡¡
СÐIJ»Òª¸øÿ¸öÇëÇó·ÖÅä¹ý¶àÄڴ棬ÒòΪÕâÑùÀ¬»ø»ØÊÕÆ÷½«±ØÐë¸üƵ·±µØ½øÐиü¶àµÄ¹¤×÷¡£ÁíÍ⣬²»ÒªÈò»±ØÒªµÄÖ¸ÕëÖ¸Ïò¶ÔÏó£¬ÒòΪËüÃǽ«Ê¹¶ÔÏ󱣳ֻ״̬£¬²¢ÇÒÓ¦¾¡Á¿±ÜÃ⺬ Finalize ·½·¨µÄ¶ÔÏó£¬ÒòΪËüÃÇÔÚºóÃæ»áµ¼Ö¸ü¶àµÄ¹¤×÷¡£ÌرðÊÇÔÚ Finalize µ÷ÓÃÖ ......
ÏÂÃæ½éÉÜÈçºÎ½øÐÐASP.NETÖÐÍøÕ¾·ÃÎÊÁ¿µÄͳ¼Æ¡£
Ò»¡¢½¨Á¢Ò»¸öÊý¾Ý±íIPStatÓÃÓÚ´æ·ÅÓû§ÐÅÏ¢
ÎÒÔÚIPStat±íÖдæ·ÅµÄÓû§ÐÅÏ¢Ö»°üÀ¨µÇ¼Óû§µÄIP£¨IP_Address£©£¬IPÀ´Ô´£¨IP_Src£©ºÍµÇ¼ʱ¼ä£¨IP_DateTime£©£¬Ð©±íµÄÐÅÏ¢±¾ÈËÖ»±£´æÒ»ÌìµÄÐÅÏ¢£¬Èç¹ûҪͳ¼Æÿ¸öÔµÄÐÅÏ¢ÔòÒª±£´æÒ»¸öÔ¡£
¶þ¡¢ÔÚGlobal.asaxÖлñÈ¡Óû§ÐÅÏ¢ ......
Èç¹ûÄãÒѾÓн϶àµÄÃæÏò¶ÔÏ󿪷¢¾Ñ飬Ìø¹ýÒÔÏÂÕâÁ½²½£º
¡¡¡¡µÚÒ»²½¡¡ÕÆÎÕÒ»ÃÅ.NETÃæÏò¶ÔÏóÓïÑÔ£¬C#»òVB.NET ÎÒÇ¿ÁÒ·´¶ÔÔÚûϵͳѧ¹ýÒ»ÃÅÃæÏò¶ÔÏó(OO)ÓïÑÔµÄÇ°ÌáÏÂȥѧASP.NET¡£ ASP.NETÊÇÒ»¸öÈ«ÃæÏò¶ÔÏóµÄ¼¼Êõ£¬²»¶®OO£¬ÄǾø¶Ôѧ²»ÏÂÈ¥!
¡¡
¡¡µÚ¶þ²½¡¡¶Ô.NET FrameworkÀà¿âÓÐÒ»¶¨µÄÁ˽⠿ÉÒÔͨ¹ý¿ª·¢Windows Fo ......