国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
DataList的使用及一些參數(shù)_4C網(wǎng)絡(luò)
DataList的使用及一些參數(shù)
2006年12月24日 星期日 12:20

如果你不滿足于系統(tǒng)提供的幾種列表方式,可以設(shè)置列表方式為“DataList綁定”,然后修改分類模板template/list1.aspx中的DataList控件。

默認(rèn)DataList控件如下:

  <asp:DataList id="dlNews"
  CellPadding="5"
  CellSpacing="0"
  GridLines="None"
  RepeatColumns="3"
  RepeatDirection="Horizontal"
  RepeatLayout="Table"
  Visible=false
  Width="100%"
  runat="server">
  <ItemStyle CssClass="alignCenterTop"/>
  <ItemTemplate>
   <%#LinkImg((System.Data.DataRowView)Container.DataItem)%>
   <%#LinkTitle((System.Data.DataRowView)Container.DataItem)%>
  </ItemTemplate>
  </asp:DataList>

DataList控件使用方法詳見:http://msdn2.microsoft.com/zh-CN/library/9cx2f3ks.aspx

如果你裝有.net framework sdk文檔請(qǐng)看:ms-help://MS.NETFrameworkSDKv1.1.CHS/cpgenref/html/cpconDataListWebServerControl.htm

ItemTempate中如何顯示新聞信息:

新聞標(biāo)題(帶鏈接): <%#LinkTitle((System.Data.DataRowView)Container.DataItem,40)%>
(其中40為標(biāo)題長度,可修改)

標(biāo)題圖片(帶鏈接): <%#LinkImg((System.Data.DataRowView)Container.DataItem)%>

新聞日期: <%#FormatTime((DateTime)DataBinder.Eval(Container.DataItem,"dateandtime"))%>

新聞簡介: <%#DataBinder.Eval(Container.DataItem,"summary")==DBNull.Value ? IWMS.Utility.WbText.NoHtml((string)DataBinder.Eval(Container.DataItem,"content")): IWMS.Utility.WbText.UrlAddPrefix((string)DataBinder.Eval(Container.DataItem,"summary"),urlPrefix)%>

新聞URL: <%#DataBinder.Eval(Container.DataItem,"aurl")==DBNull.Value ? GetUrlNews((int)DataBinder.Eval(Container.DataItem,"articleid"),(int)DataBinder.Eval(Container.DataItem,"classid"),(DateTime)DataBinder.Eval(Container.DataItem,"dateandtime")): urlPrefix+"trans.aspx?id="+DataBinder.Eval(Container.DataItem,"articleid")%>

 

 

 

 

RepeatDirection="Horizontal"改為  RepeatDirection="Vertical",新聞可以按垂直順序排列.

  GridLines="None"改為  GridLines="1",每行新聞中間有一條橫線分割 

 GridLines="2"每列新聞之間有一條豎線分割

  RepeatColumns="3"表示分幾列顯示

  CellPadding="5"   CellSpacing="0"都是表格顯示參數(shù)

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
ASP.NET數(shù)據(jù)綁定
[轉(zhuǎn)]C# Eval在asp.net中的用法及作用
ASP.NET 數(shù)據(jù)綁定常用代碼
GridView 模板列中的數(shù)據(jù)綁定
Datalist分頁
asp.net 時(shí)間格式轉(zhuǎn)換的問題 - 已解決 - 搜搜問問
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服