DetailsView分页显示数据
来源:互联网 发布:大圣美人进阶数据 编辑:程序博客网 时间:2024/06/05 20:16
aspx页面部分:
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" Height="50px"
Width="500px" AllowPaging="True" DataSourceID="SqlDataSource">
<Fields>
<asp:BoundField Datafield="xsxm" HeaderText="姓名" ReadOnly="true"/>
<asp:BoundField Datafield="xsxb" HeaderText="性别"/>
<asp:BoundField Datafield="xss" HeaderText="所在地"/>
</Fields>
</asp:DetailsView>
<asp:SqlDataSource ID="SqlDataSource"
SelectCommand="use xsrxglxt select xsxm,xsxb,xss from S_xs"
connectionstring="<%$ ConnectionStrings:NorthwindConnection %>"
RunAt="server"/>
web.config部分:
添加connectionStrings
<connectionStrings>
<add name="NorthwindConnection" connectionString="Data Source=xmuserver;Initial Catalog=xsrxglxt;Persist Security Info=True;User ID=sa;Password=x3m0u8;MultipleActiveResultSets=False;Packet Size=4096;Application Name="Microsoft SQL Server Management Studio"" providerName="System.Data.SqlClient"/>
</connectionStrings>
效果:
- DetailsView分页显示数据
- 解决DetailsView数据源无数据时不显示的问题
- DetailsView显示特定项
- DetailsView数据更新
- 数据分页显示方案
- 数据分页显示
- repeater分页显示数据
- 分页显示数据
- 数据分页显示 - Oracle
- jsp分页显示数据
- 分页显示数据
- ListView分页显示数据
- dataGridView分页显示数据
- List 分页显示数据
- GridView分页显示数据
- mysql 数据分页显示
- 分页显示数据库数据
- 分页显示数据
- poj 2406
- android preferenceActivity的用法
- hdu 1164 Eddy's research I
- 编译华天正源码的时候终端会在没有编译完的情况下直接退出的解决方法
- uva 10827 - Maximum sum on a torus(最大子矩阵升级版)
- DetailsView分页显示数据
- 序列化类型为“System.Data.Entity.DynamicProxies.Photos....这个会的对象时检测到循环引用
- 我的革命史,三年来的总结(一)
- 常用正则表达(二)
- HDOJ2546 饭卡(0/1背包)
- 内存对齐
- C++对话系列(一)智能指针 auto_ptr再回忆
- 排序算法之四归并排序
- 模板类友元函数