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
Ïà¹ØÎĵµ£º
16. Êʵ±µØʹÓù«¹²ÓïÑÔÔËÐпâµÄÀ¬»ø»ØÊÕÆ÷ºÍ×Ô¶¯ÄÚ´æ¹ÜÀí ¡¡¡¡
СÐIJ»Òª¸øÿ¸öÇëÇó·ÖÅä¹ý¶àÄڴ棬ÒòΪÕâÑùÀ¬»ø»ØÊÕÆ÷½«±ØÐë¸üƵ·±µØ½øÐиü¶àµÄ¹¤×÷¡£ÁíÍ⣬²»ÒªÈò»±ØÒªµÄÖ¸ÕëÖ¸Ïò¶ÔÏó£¬ÒòΪËüÃǽ«Ê¹¶ÔÏ󱣳ֻ״̬£¬²¢ÇÒÓ¦¾¡Á¿±ÜÃ⺬ Finalize ·½·¨µÄ¶ÔÏó£¬ÒòΪËüÃÇÔÚºóÃæ»áµ¼Ö¸ü¶àµÄ¹¤×÷¡£ÌرðÊÇÔÚ Finalize µ÷ÓÃÖ ......
ÎÒµÄÀí½âprofile¾ÍÊÇͨ¹ýÎÒÃDZàдµÄÅäÖÃÎļþ ×Ô¶¯µÄÔÙÊý¾Ý¿âÖб£´æÎÒÃÇÐèÒªµÄÊý¾Ý¡£
ÕâÊÇÒ»¸ö¼òµ¥µÄÅäÖãº
<profile automaticSaveEnabled="true" defaultProvider="sqlprocider">
<providers>
<add name="sqlprocider" type="Syste ......
Ò»¡¢Ôõô½«CheckBoxµÄÖµ´æ´¢ÔÚÊý¾Ý¿âÖУ¬¼´Ò»¸öCheckBox±»Ñ¡¶¨ºó£¬ÈçºÎÔÚÊý¾Ý¿âÖбíʾÕâÖÖÑ¡¶¨£¿
Ê×ÏÈÔÚÊý¾Ý¿âÖж¨Ò弸ÁÐbitÀàÐ͵ÄÊý¾ÝÁУ¬ÓÃÀ´±íʾij¸öCheckBoxÊÇ·ñ±»Ñ¡¶¨£¬Êý¾Ý¿âÖеÄֵΪtrue»òfalse.
ǰ̨´úÂ룺
ÊÇ·ñÍƼö£º<asp:CheckBox ID="IsRecommend" runat="server" />
......
µ½Èí¼þ¹«Ë¾Ñ§IT¼¼Êõhttp://www.tsp2c.cn/
Ajax Ó¦¸Ã²»ÊÇÒ»Ïî¼¼Êõ£¬ÊÇÒ»ÖÖ˼Ïë¶øÒÑ£¬¸ú ASP.NET ÒÔ¼°ÆäËü Web ¿ª·¢ÓïÑÔûÓÐʲô̫´ó¹Øϵ£¬ÕâÀïÖ»ÊÇ̸̸ ASP.NET ÖÐĿǰʹÓÃµÄ Ajax ¼¼ÊõÒÔ¼°ÆäËüһЩʵÏÖ Ajax µÄÓÅÐã¿ò¼Ü¡£
¡¡¡¡Ajax ÒѾºÜÁ÷ÐÐÒ»Õó×ÓÁË£¬ÏÖÔÚ̸ Ajax ¾õµÃÓеãÀÏÍÁ¡£Ä¿Ç°ËùνµÄ Web2.0 ÍøÕ¾£¬»ù±¾ÉÏûÓв» ......