11.1.1添加编号列.pptVIP

  • 34
  • 0
  • 约5.17千字
  • 约 20页
  • 2016-05-23 发布于天津
  • 举报
11.1.1添加编号列

第11章 数据绑定相关主题 本章要点 对GridView和DetailsView不同字段进行定制 综合使用TemplateField 在GridView和DetailsView控件中显示超链接、复选框和图像 在SQL WHERE子句中实现模糊查询 11.1 GridView和DetailsView的字段 11.1.1 添加编号列 插入 GridView1, 插入 SqlDataSource1 SqlDataSource1绑定到GridView1, 在 GridView1中添加字段—id号, 编辑模板; 插入Label1到id号模板中。 11.1.1 添加编号列 结果: 把Text=“Label1”改为红色的, 则id号列的结果可为: 1 2 3 4 asp:TemplateField HeaderText=id号 ItemTemplate asp:Label ID=Label1 runat=server Text=Label/asp:Label /ItemTemplate /asp:TemplateField Text=“%# Container.DataItemIndex + 1 %” 11.1.2 HyperLinkField 1) 在GridView1中,添加新列--字段 I

文档评论(0)

1亿VIP精品文档

相关文档