protected void Page_Load(object sender, EventArgs e)
{
string CnStr=@"Data Source=CHENYINGQIANG\sqlexpress;Initial Catalog=test;Integrated Security=True ";
SqlConnection MyCon=new SqlConnection(CnStr);
MyCon.Open();
string SQLStr = "select * from test";
SqlDataAdapter MyAdapter = new SqlDataAdapter(SQLStr, MyCon);
DataSet MyData = new DataSet();
MyAdapter.Fill(MyData, "test"); GridView1.DataSource = MyData;
this.GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
this.Message.Text = "aaaaaaa";
}
Message是一个label控件,显示不了
{
string CnStr=@"Data Source=CHENYINGQIANG\sqlexpress;Initial Catalog=test;Integrated Security=True ";
SqlConnection MyCon=new SqlConnection(CnStr);
MyCon.Open();
string SQLStr = "select * from test";
SqlDataAdapter MyAdapter = new SqlDataAdapter(SQLStr, MyCon);
DataSet MyData = new DataSet();
MyAdapter.Fill(MyData, "test"); GridView1.DataSource = MyData;
this.GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
this.Message.Text = "aaaaaaa";
}
Message是一个label控件,显示不了
解决方案 »
- Enterprise Library 使用ODP.net
- 为过程或函数 指定了过多的参数 求分析~·
- 大家好,我需要在asp.net中调用word组件,在vs自带服务器中一切正常,但是移到IIS之后,在 wordDocument = wordApplicatio
- 有关Dropdownlist绑定问题-------在线等
- 在 ASP.NET 中如何嵌入 HTML,实现类似 <jsp:include /> 的功能?
- 计算结果不对!
- 奇怪:为什么梅花雨日历在htm页面可以用,在aspx文件就错?????
- 求教move_hover事件的用法
- 奇怪的问题,超连接中使用确认对话框无效!!!!!!!!!!!!!
- 页面长时间打开不动,ajax怎么还会失效,什么原因?
- 怎么用javascript调用类中的方法
- DataList中CheckBox怎么用?
忘记注册了