<%@ Register TagPrefix="Title" TagName="TitleShow" Src="/aspnetdata/Title.ascx" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Configuration" %>
<html>
<head>
	<script language="C#" runat="server">
	void Page_load(Object sender,EventArgs e){
	string nowDSN = ConfigurationSettings.AppSettings["dsn"];
	try{ 
		SqlConnection NowConn = new SqlConnection(nowDSN);
		SqlDataAdapter re = new SqlDataAdapter("select * from Customers", NowConn);
		DataSet ds = new DataSet();
		re.Fill(ds, "Customers");
		show.Text="以" + nowDSN + "连接成功";
	}
	catch(Exception Uppr){
		show.Text="以" + nowDSN + "连接失败" + "系统错误信息：" + Uppr.ToString();
	}
	}
	</script>
</head>
<body background="/aspnetdata/images/winback.gif">
<Title:TitleShow id="BookT" Runat="server" />
<ASP:LABEL ID="show" runat="server" />
</body>
</form>