Question: Display FAQ Categories/Q&A from DB

  • Thread starter Thread starter Bobby Edward
  • Start date Start date
B

Bobby Edward

The FAQs on my site are going to be dynamically generated from 2 data
tables...

"one table": FaqCategories: FaqCategoryId, FaqCategory
"many table": Faqs: FaqId, FaqCategoryId, Question, Answer

On my actual FAQ page, how do you suggest I lay this out?

I would prefer to have the Categories with the questions (indented) at the
top. When you click on the question it jumps down to the proper Q&A (I
guess using the anchor tag??)

Your suggestions are appreciated!

Thanks...
 
sloan said:
I would go to a Nested Repeater.

You can substitute GridView, DataGrid (1.1) or DataList for "Repeater" in
my above statement.

Anchor tags are pretty norm for Page Jumping.

.........

Thanks - Would I have to create the anchor tags on the fly, or would you
suggest storing them in the database too?
 
I'd probably create them on the fly.

You can write a public (or protected) method on the code behind page.

MyPage.cs


private int _tagCounter = 0;
public string CreateTag( object FaqId )
{

return Convert.ToString( _tagCounter++ );
//or
// return Convert.ToString( FaqId);
//note, with data binding, you need to pass it in as "object".....

}


Then call that routine...wrap it around a Data.Eval (or similar) call....
 
Back
Top