<%@ Register TagPrefix="Title" TagName="TitleShow" Src="/aspnetdata/Title.ascx" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="ACCDataProcess" %>
<html>
<head>
	<script language="C#" runat="server">
	UseAccData M=null;
	void OKClick(object sender,EventArgs e){
		if(MDB.Text!=""){
			M = new UseAccData(MDB.Text);
			string strComm="select * from " + TB.Text;
			string tbName=TB.Text;
			object f=Session["NowDS"];
			M.ControlBind(strComm, tbName,ref f, sf, "DataGrid",true);
		}
		else{
			err.Text="未输入文件名";
		}
	}
	</script>
</head>
<body background="/aspnetdata/images/winback.gif">
<Title:TitleShow id="BookT" Runat="server" />
<form runat="server">
<asp:panel id="gData" runat="server" >
输入MDB文件名称及路径：<ASP:TEXTBOX runat="server" id="MDB" /><br>
输入数据表名称：<ASP:TEXTBOX runat="server" id="TB" /><ASP:button Text="OK" Runat="server" onclick="OKClick" /><br><br>
<asp:Label id="err" runat="server" />
</asp:panel>
      <ASP:DataGrid id="sf" runat="server"
        BorderColor="black"
        BorderWidth="1"
        GridLines="Both"
        CellPadding="3"
        CellSpacing="0"
        Font-Name="Verdana"
        Font-Size="9pt"
        HeaderStyle-BackColor="Yellow"
	SelectedItemStyle-BackColor="#FFFFC0"
	aUTOgENERATEcOLUMNS="true"
>

</ASP:DataGrid>
<asp:label id="rr" runat="server" />
</form>
</body>