首页上一页 1 下一页尾页 5 条记录 1/1页
请问一下gridview的使用及怎样编写gridvie的后台代码?
发表在ASP.NET图书答疑
2008-08-27
是否精华
是
否
版块置顶:
是
否
代码我自己弄的:就是无法显示页面,也不知道后台怎么编写(第8章)
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
ForeColor="#333333" GridLines="None">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:BoundField DataField="ContId" HeaderText="编号" Visible="False">
<ControlStyle Font-Size="23pt" />
</asp:BoundField>
<asp:BoundField DataField="Subject" HeaderText="标题" />
<asp:BoundField DataField="UserName" HeaderText="作者" />
<asp:BoundField DataField="CreateTime" HeaderText="创建日期和时间">
<HeaderStyle Font-Size="10pt" />
<FooterStyle Font-Size="160pt" />
</asp:BoundField>
<asp:BoundField DataField="LastAnswerTime" HeaderText="最后回复时间" />
<asp:BoundField DataField="HitCount" HeaderText="人气指数" />
<asp:HyperLinkField DataNavigateUrlFields="ContId" DataNavigateUrlFormatString="~/teizixinxi/chakan.aspx?ContId={0}"
HeaderText="详细信息" Text="详细信息" />
<asp:CommandField ShowDeleteButton="True" />
</Columns>
<RowStyle BackColor="#EFF3FB" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>