I would like to make a FAQ page similar to here: Forum FAQ using an sql database. Does anyone ha开发者_运维技巧ve any ideas?
create table faq_questions and add there questions,
table structure:
categorie, question, answer
and the read that data to website, what programming language you are using?
this is the final answer for my own question. Here it is it
<asp:Repeater id="faqCategoryList" runat="server">
<HeaderTemplate>
<h4>
Frequently Asked Questions</h4>
</HeaderTemplate>
<ItemTemplate>
<a href='#<%# Eval("FAQCategoryCode")%>' class="lnkButton">
<%# Eval("CategoryName")%>
</a>
</ItemTemplate>
<SeparatorTemplate>
<hr class="dashed" />
</SeparatorTemplate>
<FooterTemplate>
<div style="margin-bottom: 30px;">
</div>
</FooterTemplate>
</asp:Repeater>
<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate>
<fieldset id='<%# ((System.Data.DataRowView)Container.DataItem)["FAQCategoryCode"]%>'>
<legend><span style="font-size: medium; font-weight: bold;">
<%# ((System.Data.DataRowView)Container.DataItem)["CategoryName"]%>
</span></b> </legend>
<asp:Repeater id="Repeater2" datasource='<%# ((System.Data.DataRowView)Container.DataItem).CreateChildView("FaqRelation")%>'
runat="server">
<ItemTemplate>
<div style="font-weight: bold;">
<%# ((System.Data.DataRowView)Container.DataItem)["Question"]%>
</div>
<br />
<%#((System.Data.DataRowView)Container.DataItem)["Answer"]%>
<br />
<br />
</ItemTemplate>
<SeparatorTemplate>
<hr class="dashed" />
</SeparatorTemplate>
<FooterTemplate>
<a href="javascript:scroll(0,0)" style="float: right">
<img src="Images/png/icon_back_top.gif" class="lnkButton" alt="top" />Top</a>
</FooterTemplate>
</asp:Repeater>
</fieldset>
</ItemTemplate>
<FooterTemplate>
<br />
</FooterTemplate>
</asp:Repeater>
精彩评论