精華網絡內容 :http://www.qqread.com/network/
<%@ Page language="c#" Debug="true" Codebehind="Image2Access.aspx.cs" AutoEventWireup="false" Inherits="eMeng.Exam.Image2Access" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>上傳文件到 Access 數據庫</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="DataGridShowImage" method="post" runat="server" enctype="multipart/form-data">
<h3 align="center">上傳文件到 Access 數據庫</h3>
<asp:DataGrid ID="DG_Persons" AutoGenerateColumns="False" Width="99%" HeaderStyle-BackColor="#ff0000"
HeaderStyle-Font-Bold="True" HeaderStyle-ForeColor="#ffffff" ItemStyle-BackColor="Beige" BorderColor="#000000"
Runat="server" HeaderStyle-HorizontalAlign="Center">
<Columns>
<asp:TemplateColumn HeaderText="姓名">
<ItemTemplate>
<asp:Label Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PersonName") %>' ID="Label1"/>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="電子郵件">
<ItemTemplate>
<asp:Label Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PersonEmail") %>' ID="Label2"/>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="性別">
<ItemTemplate>
<asp:Label Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PersonSex") %>' ID="Label3"/>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="照片">
<ItemTemplate>
<asp:Image Runat=server ID="Image1" ImageUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem, "PersonID")) %>' />
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
<b>文件名字:</b><input id="MyFileName" type="text" runat="server" NAME="MyFileName">
<P>
<b>文件:</b><input id="MyFile" type="file" runat="server" NAME="MyFile">
<br>
<br>
<input type="submit" value="開始上傳" runat="server" ID="Submit1" NAME="Submit1">
</P>
</form>
</body>
</HTML>