Question: Display FAQ Categories/Q&A from DB

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...
 
B

Bobby Edward

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?
 
S

sloan

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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,232
Latest member
DorotheaDo

Latest Threads

Top