Question: Display FAQ Categories/Q&A from DB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bobby Edward

    Question: Display FAQ Categories/Q&A from DB

    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

    #2
    Re: Question: Display FAQ Categories/Q&A from DB

    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.

    ..........
    Google "Nested _________" <<put in a control name
    and you'll find bunches of examples.








    "Bobby Edward" <bobby@nobody.c omwrote in message
    news:eEWV3hIKJH A.3936@TK2MSFTN GP04.phx.gbl...
    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...
    >

    Comment

    • Bobby Edward

      #3
      Re: Question: Display FAQ Categories/Q&amp;A from DB


      "sloan" <sloan@ipass.ne twrote in message
      news:%23VenmCJK JHA.728@TK2MSFT NGP04.phx.gbl.. .
      >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?


      Comment

      • sloan

        #4
        Re: Question: Display FAQ Categories/Q&amp;A from DB

        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.ToStrin g( _tagCounter++ );
        //or
        // return Convert.ToStrin g( 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....



        "Bobby Edward" <bobby@nobody.c omwrote in message
        news:%23VZB1PJK JHA.2208@TK2MSF TNGP02.phx.gbl. ..
        >
        "sloan" <sloan@ipass.ne twrote in message
        news:%23VenmCJK JHA.728@TK2MSFT NGP04.phx.gbl.. .
        >>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?
        >

        Comment

        Working...