asp.net---ListView的简单使用
来源:互联网 发布:复共轭矩阵与厄米矩阵 编辑:程序博客网 时间:2024/04/30 09:10
.aspx代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ListView练习.aspx.cs" Inherits="ListView练习" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" ItemPlaceholderID="holder"><%--ItemPlaceholderID="holder"重要告诉Item占位符的ID--%> <LayoutTemplate><%--1布局模板必要--%> <p>员工信息表</p> <p>TEST</p> <p runat="server" id="holder"></p><%--id="holder"告诉ItemTemplate插入到哪个位置--%> <p>TEST</p> </LayoutTemplate> <ItemTemplate><%--2数据模板必要--%> <p> <%#Eval("姓名")%> <%#Eval("年龄")%></p><%--姓名和年龄是字段名--%> </ItemTemplate> </asp:ListView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:userinfoConnectionString %>" SelectCommand="SELECT * FROM [员工信息表]"></asp:SqlDataSource> </div> </form></body></html>
效果如下:
0 0
- asp.net---ListView的简单使用
- Asp.Net ListView 控件的使用
- Asp.Net WebForm ListView的使用
- Asp.Net ListView+DataPager 的使用
- ASP.NET--profile的简单使用
- Asp.net缓存的简单使用
- asp.net EF的简单使用
- ASP.net中模板的简单使用
- 在ASP.NET 3.5中使用新的ListView控件
- 在ASP.NET 3.5中使用新的ListView控件
- VB.NET 中 使用 ListView 控件的简单例子
- VB.NET 中 使用 ListView 控件的简单例子
- VB.NET中使用ListView控件的简单例子
- 简单的ListView使用
- ListView的简单使用
- listview的简单使用
- ListView的简单使用
- 简单的ListView使用
- Android SDK Manager国内下载缓慢的问题
- [qemu] 端口重定向
- clnt_create: RPC: Program not registered
- ascii码转换为对应的字符串
- Android中activity背景色的设置
- asp.net---ListView的简单使用
- 有一种蓝,是神往,是心醉,是心伤
- android 网络编程
- ios之block和retain cycle (经典)
- 条件控制:IF语句和CASE语句
- 大三第九个星期
- String.Format in JavaScript
- 临时表
- TortoiseSVN解决冲突