//为了便于阅读写的有些地方有点重复,见谅
//Web.config数据库链接字符串
<connectionStrings>
<add name="access" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|/ccc.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
//前台代码
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default4.aspx.cs" ValidateRequest="false" Inherits="RM.WebApp.default4" %>
<!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 id="form1" runat="server">
<div>
<asp:GridView ID="gdv1" runat="server" AutoGenerateColumns="False" Width="530px" OnRowCommand="gdv1_RowCommand" DataKeyNames="id">
<Columns>
<asp:TemplateField HeaderText="ID">
<EditItemTemplate>
<asp:Label ID="lblID2" runat="server" Text='<%# Eval("id") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblID" runat="server" Text=