ASP.NET如何创建文章标题列表控件?
如题,希望给出详细的步骤,及需要注意的问题。 问题点数:20、回复次数:3Top
1 楼46539492(男儿当自强(http://blog.csdn.net/46539492/))回复于 2004-12-01 08:41:19 得分 5
用datagrid呀。
---------------------
<asp:datagrid
id=dg
runat="server"
BorderWidth="0"
autocustompaging="true"
AutoGenerateColumns="false"
showheader=true
headerstyle-backcolor="#aa56a1"
cellpadding=2
cellspacing=1
allowpaging=true
backcolor=#ffcc99
width=100% >
<pagerstyle visible=false/>
<columns>
<asp:templatecolumn
headertext="删除"
headerstyle-height=23
headerstyle-width=5%
itemstyle-backcolor=#ffffff
itemstyle-horizontalalign=center>
<itemtemplate>
<input type='checkbox' name="chk" value='<%#databinder.eval(container.dataitem,"renoteid")%>'>
</itemtemplate>
</asp:templatecolumn>
<asp:templatecolumn
headertext="标题"
headerstyle-width=13%
itemstyle-backcolor=#ffffff
>
<itemtemplate>
<a href=tecview.aspx?noteid=<%# databinder.eval(container.dataitem,"noteid")%> target="_blank"><%#container.dataitem("title")%></a>
</itemtemplate>
</asp:templatecolumn>
<asp:templatecolumn
headertext="内容"
headerstyle-width=45%
itemstyle-backcolor=#ffffff
>
<itemtemplate>
<%#container.dataitem("content")%>
</itemtemplate>
</asp:templatecolumn>
<asp:templatecolumn
headertext="ip"
headerstyle-width=12%
itemstyle-backcolor=#ffffff
>
<itemtemplate>
<%#container.dataitem("ip")%>
</itemtemplate>
</asp:templatecolumn>
<asp:templatecolumn
headertext="时间"
headerstyle-width=13%
itemstyle-backcolor=#ffffff
>
<itemtemplate>
<%#container.dataitem("ttime")%>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>Top
2 楼conquersky(conquersky V)回复于 2004-12-01 08:48:30 得分 5
用datalist datagrid 很容易实现Top
3 楼forideal(我心飞翔)回复于 2004-12-01 08:57:03 得分 10
用DataList或DataGrid创建成用户控件或include(建议使用用户控件,可以在控件页面中使用asp.net的高速缓存),在需要的aspx页面中调用它就是了。Top




