private void DisplayHomeDataHeader()
{
DataSet objds = ObjLogic.DisplayPagesdataByPrntIdHome(0);
if (objds.Tables[0].Rows.Count > 0)
{
DataHome.DataSource = objds;
DataHome.DataBind();
}
}
protected void DataHome_ItemDataBound(object sender, DataListItemEventArgs e)
{
DataSet objds = ObjLogic.DisplayPagesdataByPrntIdHomesub(Convert.ToInt32(DataHome.DataKeys[e.Item.ItemIndex]));
if (objds.Tables[0].Rows.Count > 0)
{
Repeater r = ((Repeater)e.Item.FindControl("RepSubHome"));
r.DataSource = objds;
r.DataBind();
}
}
===================================
asp:DataList ID="DataHome" runat="server" DataKeyField="cms_page_fk"
RepeatDirection="Horizontal" onitemdatabound="DataHome_ItemDataBound" RepeatColumns="4">
ItemTemplate>
div class="panel">
a href= '<%# "../" +Eval("cms_page_name")%>' alt="" runat="server" class="aremove">
asp:Label ID="LblHeader" runat="server" Text='<%# Eval("cms_page_show")%>' CssClass="panel-head"asp:Label/a>
div class="container">
div style="width: 155px; margin: 0 auto; margin-top: 3px;">
asp:Image ID="ImgHome" runat="server" Width="155px" Height="61px" ImageUrl='<%#"../App_Themes/mipservhome/images/"+ Eval("cms_page_image")%>' alt=""/>
/div>
asp:Repeater id="RepSubHome" runat="server" >
ItemTemplate>
table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" style="margin-top: 2px">
tr>
td valign="top" style="width: 3px">
height="11" />
/td>
td class="left-li">
a id="A1" href= '<%# "../" +Eval("cms_page_name")%>' alt="" runat="server">
asp:Label ID="LblSub" runat="server" Text='<%# Eval("cms_page_show")%>'>
/a>
/td>
/tr>
/table>
/ItemTemplate>
/asp:Repeater>
/div
ItemTemplate
asp:DataList
No comments:
Post a Comment