Re: Rendering a questionnaire

Discussion in 'ASP .Net' started by Alex Papadimoulis, Nov 14, 2003.

  1. Adrian,

    I prefer to use Repeaters as opposed to dynamically created controls. Once
    a repeater is bound, it's bound ... you don't have to recreate controls
    everytime you postback. Don't forget use of the ItemCommand event, which
    you can use in conjunction with a button's CommandArgument and CommandName.

    Good luck!
    Alex Papadimoulis


    "Adrian" <> wrote in message
    news:411401c3aac9$97032520$...
    > I need some advice on the best way of rendering a
    > questionnaire.
    >
    > I have already captured the questionnaire construction in
    > a database. Essentially I have two database tables, the
    > main one which contains the number, question and an ID
    > which represents the type of question. 1 - represents a
    > number answer (which I will need to render as a textbox
    > with a number validator) 2 - represnts text (which i will
    > need to render as a textarea with a requiredfiled
    > validator) and 3 - which represents a list (which i will
    > render as a drop-down box)
    > The second database table contains the details for the
    > contents of any dropdown boxes.
    >
    > Once rendered, users will have to answer the questions and
    > submit.
    >
    > The question is, what is the best way to render this.
    > Datagrid / Datalist / Repeater or just construct on the
    > fly. I don't think this can be done with a datagrid or
    > datalist. So I guess I am looking at a repeater or on-the-
    > fly html construction. What's the best way
    >
    > Many Thanks
    >
    > Adrian
    Alex Papadimoulis, Nov 14, 2003
    #1
    1. Advertising

  2. Alex Papadimoulis

    Adrian Guest

    Thanks Alex, but how is this done if I don't know what
    control will be in the answer column until I query the
    database.

    For instance, row 1 might be a textbox with number
    validator, row 2 might be a dropdown box, the contents of
    which come from another query etc etc.

    Thanks

    Adrian

    >-----Original Message-----
    >Adrian,
    >
    >I prefer to use Repeaters as opposed to dynamically

    created controls. Once
    >a repeater is bound, it's bound ... you don't have to

    recreate controls
    >everytime you postback. Don't forget use of the

    ItemCommand event, which
    >you can use in conjunction with a button's

    CommandArgument and CommandName.
    >
    >Good luck!
    >Alex Papadimoulis
    >
    >
    >"Adrian" <> wrote in

    message
    >news:411401c3aac9$97032520$...
    >> I need some advice on the best way of rendering a
    >> questionnaire.
    >>
    >> I have already captured the questionnaire construction

    in
    >> a database. Essentially I have two database tables, the
    >> main one which contains the number, question and an ID
    >> which represents the type of question. 1 - represents a
    >> number answer (which I will need to render as a textbox
    >> with a number validator) 2 - represnts text (which i

    will
    >> need to render as a textarea with a requiredfiled
    >> validator) and 3 - which represents a list (which i will
    >> render as a drop-down box)
    >> The second database table contains the details for the
    >> contents of any dropdown boxes.
    >>
    >> Once rendered, users will have to answer the questions

    and
    >> submit.
    >>
    >> The question is, what is the best way to render this.
    >> Datagrid / Datalist / Repeater or just construct on the
    >> fly. I don't think this can be done with a datagrid or
    >> datalist. So I guess I am looking at a repeater or on-

    the-
    >> fly html construction. What's the best way
    >>
    >> Many Thanks
    >>
    >> Adrian

    >
    >
    >.
    >
    Adrian, Nov 18, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ^^@++

    Questionnaire with DropDownList

    ^^@++, May 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    376
    ^^@++
    May 18, 2004
  2. =?Utf-8?B?R2FuZXNo?=

    Automated Questionnaire

    =?Utf-8?B?R2FuZXNo?=, Mar 30, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    336
    =?Utf-8?B?R2FuZXNo?=
    Mar 30, 2005
  3. Clippy
    Replies:
    22
    Views:
    1,815
    Jeff Thies
    Apr 7, 2004
  4. Replies:
    3
    Views:
    426
  5. Vili
    Replies:
    2
    Views:
    297
Loading...

Share This Page