|
1、建所需数据库和表,语句如下:
--建立数据库 create database test --使用该数据库 use test --建立存放图片的表 create table piclist( id int Identity primary key, pic Image not null ) 2、制作上传图片的模块,代码如下: 前台html代码: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpPhoto.aspx.cs" Inherits="Test_UpPhoto" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>无标题页</title> </head> <body> <form ); } reader.Close(); conn.Close(); Response.End(); } } } |
相关文章: