dynamic server control

Discussion in 'ASP .Net Web Controls' started by angus, Nov 1, 2004.

  1. angus

    angus Guest

    Hi All,

    i have an aspx form for the user to input, and those data will be stored
    into the database.

    I would like to build up the form dynamically by using the data in the a
    database table, named question

    for example, i have a question table and the data in the question table is
    as follow

    select * from question

    ---------------------------------
    | question_data |
    ---------------------------------
    | 1 + 1 = ? |
    | 2 - 1 = ? |
    | 2 + 2 = ? |
    ---------------------------------


    Then, in my aspx page, the form will be as follow, (i assume that the form
    is built dynamically)

    (/* aspx Label here */) (/* aspx TextBox here */)

    1 + 1 = ? |_____________|
    2 - 1 = ? |_____________|
    2 + 2 = ? |_____________|

    And all the answer in the TextBox, would be saved into the database.

    If i would like to add question for the form, just insert the question into
    the question table

    e.g.

    I would like to add a question "how old are you?"

    i just "insert into question (question_data) values ('how old are you?') "

    Then, the aspx page will be

    (/* aspx Label here */) (/* aspx TextBox here */)

    1 + 1 = ? |_____________|
    2 - 1 = ? |_____________|
    2 + 2 = ? |_____________|
    how old are you? |_____________|


    So, my question is, how to build up the form dynamically like the above
    example?
    And what server control should i use?
    And how can i pass the TextBox data to the backend codehind

    Thank you.

    Regards,
    Angus
    angus, Nov 1, 2004
    #1
    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. Matthew Louden
    Replies:
    1
    Views:
    6,906
    Scott M.
    Oct 11, 2003
  2. Chris Thunell
    Replies:
    3
    Views:
    3,423
    Edward
    Jul 21, 2004
  3. Replies:
    5
    Views:
    5,578
  4. Replies:
    0
    Views:
    2,056
  5. Larry Bud
    Replies:
    1
    Views:
    345
    bruce barker
    Jan 10, 2007
Loading...

Share This Page