我有Accordion(Ajax Control),我这样做是为了从数据库中获取价值我做了我的代码但它没有得到任何价值,请任何人帮助我
“
宽度=“178”高度=“115”样式=“浮动:左;填充:10px 10px 0 10px”/>'>
标题
“取代。
答案 0 :(得分:0)
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = myData.Tables["News"];
Accordion1.DataSource = dt.DefaultView;
Accordion1.DataBind();
}
<cc1:accordion id="Accordion1" runat="server" selectedindex="0" fadetransitions="false" framespersecond="40" transitionduration="250" autosize="None">
<headertemplate>
<%# Eval("NewsCaption") %>
<%# Eval("NewsDate") %>
</headertemplate>
<contenttemplate>
<%# Eval("NewsBody") %>
</contenttemplate>