Looking for a FAQ control ...

  • Thread starter Thread starter Michael Tissington
  • Start date Start date
M

Michael Tissington

I want to pull a list of FAQs (questions and answers) from a database and
display them on a web page.

I'd like the list to initially appear as just a list of questions, when the
client clicks on a question it will expand and show the answer (client side
script).

Where can I find a web control that will do this ?

Thanks!
 
A panel is rendered as a DIV. To see this look at the rendered HTML of a
page with a panel on it.

I recommend you use a DataList, to define a template. I would use a div,
with a style="display:none" (setting a Panel's Visible property to False
doesn't render it on the client at all). Then, your javascript for the <a>
link, has to find the corresponding DIV, and set its display to 'block' or
'inline' (I think they are rendered the same way). If you click on the <a>
link again, you will probably want to set it back to 'none'.
 
Back
Top