Reapter 다중 중첩 상세 보완 정보
7501 단어 apt
<asp:Repeater ID ="rptfour" runat ="server" OnItemDataBound="two_Bind">
<ItemTemplate >
<div class="Cont_02l" style="margin-right:19px">
<div class="guanli"><h2><%#Eval("s_name") %></h2><div class="rdr_01"> >></div></div>
<asp:Repeater ID ="rptnews" runat ="server" >
<ItemTemplate >
<div class="guanli_news">
<h4><%# Common.FormatString(Eval("sxy_title").ToString (), 22) %></h4>
<p><%# UploadPicture.interceptStrs(Eval("sxy_content").ToString(), "45")%>…[ ]</p>
</div>
</ItemTemplate>
</asp:Repeater>
<div class="guanli_list">
<ul>
<asp:Repeater ID ="rptlist" runat ="server" >
<ItemTemplate >
<li>·<%# Common.FormatString(Eval("sxy_title").ToString (), 36) %></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
protected void two_Bind(object sender, RepeaterItemEventArgs e)
{
News_Bind(e,1);
}
protected void four_Bind(object sender, RepeaterItemEventArgs e)
{
News_Bind(e, 2);
}
protected void News_Bind( RepeaterItemEventArgs e,int c)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater rpttop = e.Item.FindControl("rptnews") as Repeater;
Repeater rptlist = e.Item.FindControl("rptlist") as Repeater;
DataRowView drv = (DataRowView)e.Item.DataItem;
string type = drv.Row["s_oname"].ToString();
if (rpttop != null && rptlist != null)
{
rpttop.DataSource = DB.GetDataTable("top "+c+" .............", "table1", "sxy_type=5 and sxy_tj=1 and sxy_state=1 and sxy_sType='"+type+"'", "sxy_id desc");
rpttop.DataBind();
rptlist.DataSource = DB.GetDataTable("top 5 ...........", "table1", "sxy_type=5 and sxy_state=1 and sxy_sType='" + type + "' and sxy_id not in (select top 1 sxy_id from College where sxy_type=5 and sxy_tj=1 and sxy_state=1 and sxy_sType='" + type + "' order by sxy_id desc)", "sxy_id desc");
rptlist.DataBind();
}
}
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
【TravisCI 개선】sudo apt get install하고 있던 곳을 sudo 사용하지 않게 한다 ~sudo: false로 이용하기 위해서~sudo: false 에서 빌드 돌리면 빠르다는 기사를 잘 보았으므로 실제로 해보면 5분 정도 달랐다. 기동 후의 처리가 빠른 것 같다 60 분이 55 분이면 너무 감동적이지 않을 수도 있지만 15 분이 10 분이면...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.