dynamic controls in asp.net...please help...

Discussion in 'ASP .Net Web Controls' started by Irfan Akram, Dec 13, 2004.

  1. Irfan Akram

    Irfan Akram Guest

    Hello People,

    I would appreciate your responses on this.

    I am writing an asp.net web-application involving C#. I am actually building
    a test hierarchy at the moment, which involves producing dynamic controls,
    depending on user response.

    To be more precise, I prompt the user for the number of questions, that
    should be in the test. He types in a number, say 10. Then I need to ask him
    the details of the first question, i.e. number of sub-parts in question 1.
    The user should be prompted to select through a radio button group, as to how
    many sub-parts he wants to enter i.e. 0,1,2,3 or 4. Then following that I
    will be asking him the same details for the number of sub-parts for the first
    sub-part 1, i.e. 1.1. The maximum depth allowed will be 3.

    After completing the details for the first question, I then need to prompt
    the user to get details for the second question, and then the third, till the
    end of the test. The maximum depth that the hierarchy goes to is 3, i.e.
    something like 1.1.3 will be a valid question id, but not

    As it turns out it is in effect a tree structure that I need to implement in
    asp.net, depending on user input.

    Now the problem is that I cannot do all this in a single loop, because I
    need to handle each question at a time, and also remember what the user
    entered, and then respond at each user-selection.

    Any ideas how I can handle this ? Any ideas that you guys might have will be

    Just to clarify my problem here is a simple diagram of a sample hierarchy.

    Num Questions:- 4

    Question 1 sub-parts: - 2
    Question 1.1 sub-parts : 2 i.e. 1.1.1 and 1.1.2
    Question 1.2 sub-parts: 2 i.e. 1.2.1 and 1.2.2

    Question 2 sub-parts: - 2
    Question 2.1 sub-parts : 2 i.e. 2.1.1 and 2.1.2
    Question 2.2 sub-parts: 2 i.e. 2.2.1 and 2.2.2
    Question 4 sub-parts.......


    Irfan Akram, Dec 13, 2004
    1. Advertisements

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. =?Utf-8?B?SXJmYW4gQWtyYW0=?=

    Dynamic Controls in asp.net...Building a tree hierarchy..please he

    =?Utf-8?B?SXJmYW4gQWtyYW0=?=, Dec 13, 2004, in forum: ASP .Net
    Dec 13, 2004
  2. Ronald
    Robbe Morris [C# MVP]
    Jan 17, 2006
  3. KK
    Big Brian
    Oct 14, 2003
  4. Irfan Akram

    dynamic controls in asp.net....Please Help...

    Irfan Akram, Dec 13, 2004, in forum: ASP .Net Building Controls
    Jonathan V
    Jan 2, 2005
  5. Denny Smolinski via .NET 247

    Dynamic Controls, Placeholder, Retrieve Information from Dynamic Controls

    Denny Smolinski via .NET 247, May 4, 2004, in forum: ASP .Net Web Controls
    May 4, 2004

Share This Page