using System;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Map
{
public class Creat : Page
{
protected Repeater message;
protected Label mytest;
protected void Page_Load(object sender, System.EventArgs e)
{
BindData();
mytest.Text="aaa";
}
public void BindData()
{
string connStr="Server="+ ConfigurationSettings.AppSettings["SqlServer"]+";Database=" + ConfigurationSettings.AppSettings["Dabase"] + ";User ID=" + ConfigurationSettings.AppSettings["UserID"] + ";Password=" + ConfigurationSettings.AppSettings["UserPassword"] + "";
SqlConnection conn = new SqlConnection(connStr);
string selectStr="select UnitID,uUnitID,SortCard,OwnerID,OwnerName,Filter,IsBase,PictureName,LogicalX,LogicalY,LogicalZ,CompanyID,CompanyName,SFPhoto,tSFPhoto,IsShopFace from CityMapView where parentUnitID="+Request.QueryString["ID"].Trim()+"";
SqlDataAdapter comm = new SqlDataAdapter(selectStr,conn);
DataSet ds = new DataSet();
comm.Fill(ds,"map");
message.DataSource=ds;
message.DataMember="map";
message.DataBind();
conn.Close();
}
override protected void OnInit(EventArgs e)
{
//
// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
//
//this.Load += new System.EventHandler(this.Page_Load);
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
}
}

