For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET Building Controls > January 2005 > dynamic controls in asp.net....Please Help...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author dynamic controls in asp.net....Please Help...
Irfan Akram

2005-01-16, 8:59 pm

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 1.1.3.2

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
appreciated.

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.......
.....................................
.....................................






Regards,

Irfan
Jonathan V

2005-01-16, 8:59 pm

You want to google on Final State Machines and Asp.Net
"Irfan Akram" <IrfanAkram@discussions.microsoft.com> wrote in message
news:D10F0424-05AE-4454-A090-BEDB3AD77A63@microsoft.com...
> 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 1.1.3.2
>
> 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
> appreciated.
>
> 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.......
> ....................................
> ....................................
>
>
>
>
>
>
> Regards,
>
> Irfan



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com