<asp:DataList ID="dlChuyenMuc" runat="server" OnItemDataBound="dlist_ItemDataBound"
RepeatColumns="1" RepeatDirection="Horizontal" Width="100%">
<ItemTemplate>
<asp:Literal ID="litId" runat="server" Visible="false" Text='<%# Eval("Id") %>'></asp:Literal>
<div style="padding-left: 5px; padding-right: 5px">
<div class="menu_content_left">
 </div>
<div class="menu_content">
<%# Eval("Ten") %>
</div>
<div class="menu_content_right">
 
</div>
<div class="menu_content_right_right">
 </div>
</div>
<div style="background-color: #efefee; padding-left: 5px; padding-right: 5px; padding-top: 30px">
<div class="content_mid">
<div class="content_mid_content">
<div class="new_big">
<asp:DataList ID="dlTinTuc" runat="server" RepeatColumns="1" RepeatDirection="Horizontal"
Width="100%">
<ItemTemplate>
<asp:HyperLink ID="HyperLink32" NavigateUrl='<%#"~/TinTucND.aspx?Id=" + Eval("Id") + "&TieuDe=" + GetTieuDe(Eval("TieuDe"))%>'
runat="server">
<asp:Image runat="server" Width="272" Height="182" ID="Image2" BorderWidth="1" CssClass="show_images"
ImageUrl='<%# Eval("AnhDaiDien") %>' />
</asp:HyperLink>
<p class="title_new_big">
<asp:HyperLink ID="HyperLink9" CssClass="lk_login" NavigateUrl='<%#"~/TinTucND.aspx?Id=" + Eval("Id") + "&TieuDe=" + GetTieuDe(Eval("TieuDe"))%>'
runat="server">
<asp:Label ID="lblTieuDe" runat="server" Text='<%# Eval("TieuDe") %>'></asp:Label></asp:HyperLink>
</p>
<p class="new_big_content" style="text-align: justify">
<asp:Label ID="lblTomTat" runat="server" Text='<%# Eval("TomTat").ToString().Length>150 ? Eval("TomTat").ToString().Substring(0,150)+"..." : Eval("TomTat") %>'></asp:Label></p>
</ItemTemplate>
</asp:DataList>
</div>
<div class="new_small_khung">
<asp:DataList ID="dlTinTucall" runat="server" RepeatColumns="1" RepeatDirection="Horizontal"
Width="100%">
<ItemTemplate>
<div class="new_small">
<asp:HyperLink ID="HyperLink32" NavigateUrl='<%#"~/TinTucND.aspx?Id=" + Eval("Id") + "&TieuDe=" + GetTieuDe(Eval("TieuDe"))%>'
runat="server">
<asp:Image runat="server" ID="Image2" BorderWidth="1" CssClass="show_images" ImageUrl='<%# Eval("AnhDaiDien") %>' />
</asp:HyperLink>
<div class="new_small_right">
<span class="title_new_small">
<asp:HyperLink ID="HyperLink9" CssClass="lienketnganhnghe" NavigateUrl='<%#"~/TinTucND.aspx?Id=" + Eval("Id") + "&TieuDe=" + GetTieuDe(Eval("TieuDe"))%>'
runat="server">
<asp:Label ID="lblTieuDe" runat="server" Text='<%# Eval("TieuDe").ToString().Length>35 ? Eval("TieuDe").ToString().Substring(0,35)+"..." : Eval("TieuDe") %>'></asp:Label>
</asp:HyperLink>
</span>
<p class="new_small_content" style="text-align: justify">
<asp:Label ID="lblTomTat" Height="41" runat="server" Text='<%# Eval("TomTat").ToString().Length>100 ? Eval("TomTat").ToString().Substring(0,100)+"..." : Eval("TomTat") %>'></asp:Label></p>
</div>
</div>
</ItemTemplate>
</asp:DataList>
</div>
</div>
</div>
</div>
</ItemTemplate>
</asp:DataList>
protected void dlist_ItemDataBound(object sender, DataListItemEventArgs e)
{
int TotalRows = 0;
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DataListItem parentList = e.Item;
Literal lit_Name = (Literal)parentList.FindControl("litId");
string i = (lit_Name.Text).ToString();
int j = Convert.ToInt32(i);
DataList dl2 = (DataList)parentList.FindControl("dlTinTuc");
DataList dl3 = (DataList)parentList.FindControl("dlTinTucall");
TList<TinTuc> TList_TinTuc = DataRepository.TinTucProvider.GetPaged("TrangThai=1 and IdLoaiTinTuc=" + j, "NgayCapNhat DESC", 0, 1, out TotalRows);
dl2.DataSource = TList_TinTuc;
dl2.DataBind();
TList<TinTuc> TList_TinTuc2 = DataRepository.TinTucProvider.GetPaged("TrangThai=1 and IdLoaiTinTuc=" + j, "NgayCapNhat DESC", 0, 3, out TotalRows);
dl3.DataSource = TList_TinTuc2;
dl3.DataBind();
}
}