using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Default4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// 定义数据库连接
SqlConnection CN = new SqlConnection();
try
{
//初始化连接字符串
CN.ConnectionString = ConfigurationManager.AppSettings["ConnStr"];
CN.Open();
SqlDataAdapter adp = new SqlDataAdapter("select * from tbTree", CN);
DataSet ds = new DataSet();
adp.Fill(ds);
this.ViewState["ds"] = ds;
}
catch (Exception ex)
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载