表News 字段 News_id,News_Title,News_Typeid
表News_Type 字段 Type_Id,Type_Name请问如何将News 中的记录按News_Type的分类分别显示出来
表News_Type 字段 Type_Id,Type_Name请问如何将News 中的记录按News_Type的分类分别显示出来
解决方案 »
- 字符串单引号替换为两个单引号
- asp.net 如何删除<table>标签里的内容
- asp.net 如何给后台动态生成的table设置<td>css样式
- DetailsView如何获得主键以外的数据
- 如何让服务器控件在回调的时候先运行客户端JS验证准确后才回调??
- 问一个DataGrid的问题(100分)
- 请教aps.net高手关于在webfrom(c#)读取word2000文档的问题?
- 点后退让网页显示已过期,怎么实现啊???????????????
- 有没有要实习程序员的?
- Oracle.NET,OracleConnection,ConnectionString,data source问题
- 业务实体层的设计,比如有订单表和订单明细表,采用typed dataset方案,若订单表里有关联到其他表的字段,比如CustomerID。这样的,数据
- 关于.net中框架的问题求助
public void BindGrid()
{
DB op = new DB();//这里是数据连接的,自己看
SqlConnection cn = op.createConn2;
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter("select * from shop_class",cn);
da.Fill(ds);
this.DataGrid1.DataSource = ds;
this.DataGrid1.DataBind();
for(int i=0;i<this.DataGrid1.Items.Count;i++)
{
Label l = (Label)this.DataGrid1.Items[i].FindControl("lblBigID");
DataGrid dg = (DataGrid)this.DataGrid1.Items[i].FindControl("DataGrid2");
SqlDataAdapter da2 = new SqlDataAdapter("select * from shop_books where classid="+l.Text,cn);
DataSet ds2 = new DataSet();
da2.Fill(ds2);
dg.DataSource = ds2;
dg.DataBind();
}
}