Hi,
I am just trying to bind data to accordion control using objectdatasource.I have an GetDepartments() method in BLL.Which returns all the departments.I just want to show department's title in the header of accordion.I am trying to do it like this....
.aspx
----------
<
div class="sectiontitle">
Product Categary
<br />
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetDepartments"
TypeName="BLL.Store.Department">
</asp:ObjectDataSource>
</div>
<div class="productmenulink">
<cc1:Accordion ID="Accordion1" runat="server" HeaderCssClass="" ContentCssClass=""
FadeTransitions="true" AutoSize="None" FramesPerSecond="30" TransitionDuration="240"
SelectedIndex="-1" RequireOpenedPane="false" >
<Panes>
<cc1:AccordionPane ID="AccordionPane1" runat="server" >
<Header>
asp:Label runat="server" Id="lbHeaderId" Text='<%# Eval("Title") %>'></asp:Label></Header>
<Content>
Item 1
</br> Item 2</br> Item 3</br> Item 4</br> Item 5</br> Item 6</br> Item 7</br>Item 8</br> Item 9</br> Item 10</br> Item 11</br> Item 12
</Content>
</cc1:AccordionPane>
.cs
------------
protected void Page_Load(object sender, EventArgs e)
{
Accordion1.DataSource = ObjectDataSource1;
Accordion1.DataBind();
}
But this is not working.Even accordion is just not visible on the page.I have checked my GetDepartments() method, it is fine and returning proper data.
Thanks
“Do not go where the path may lead, go instead where there is no path and leave a trail.”- Waldo Emerson