Dynamic controles

Discussion in 'ASP .Net Web Controls' started by jan v, Jul 31, 2003.

  1. jan v

    jan v Guest

    hi,

    im trying to get a dynamic questionnaire running on asp.net. But i get a
    stack overflow exception.

    this is my code, in the tblQuestions datatable there are only 4 datarows.
    foreach (DsQuestionList.tblQuestionsRow dr in
    this.dsQuestionList.tblQuestions.Rows)

    {

    Questions q = new Questions();


    q.questionID =
    int.Parse(dr[this.dsQuestionList.tblQuestions.QuestionIDColumn].ToString());

    this.plhQuestions.Controls.Add(q);

    }



    now when i do

    this.plhQuestions.Controls.Add(LoadControl("Questions.asx"));

    i does display the 4 controls but this way i cant set the ID of the question
    he has to show.

    plhQuestions (is a placeholder control)

    Does anyone have an idea?

    my e-m-a-i-l is (whithout the dashes)
    (vercauteren ) i will check back in theis newsgroup.



    Thank you
     
    jan v, Jul 31, 2003
    #1
    1. Advertising

  2. jan v

    jan v Guest

    BUG?

    Apperently if i rename the getter questionID to ID it works, is it possible
    that asp.net isn't case sensitive?


    "jan v" <tght> wrote in message
    news:...
    > hi,
    >
    > im trying to get a dynamic questionnaire running on asp.net. But i get a
    > stack overflow exception.
    >
    > this is my code, in the tblQuestions datatable there are only 4 datarows.
    > foreach (DsQuestionList.tblQuestionsRow dr in
    > this.dsQuestionList.tblQuestions.Rows)
    >
    > {
    >
    > Questions q = new Questions();
    >
    >
    > q.questionID =
    >

    int.Parse(dr[this.dsQuestionList.tblQuestions.QuestionIDColumn].ToString());
    >
    > this.plhQuestions.Controls.Add(q);
    >
    > }
    >
    >
    >
    > now when i do
    >
    > this.plhQuestions.Controls.Add(LoadControl("Questions.asx"));
    >
    > i does display the 4 controls but this way i cant set the ID of the

    question
    > he has to show.
    >
    > plhQuestions (is a placeholder control)
    >
    > Does anyone have an idea?
    >
    > my e-m-a-i-l is (whithout the dashes)
    > (vercauteren ) i will check back in theis newsgroup.
    >
    >
    >
    > Thank you
    >
    >
     
    jan v, Jul 31, 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. Rick Glos
    Replies:
    0
    Views:
    658
    Rick Glos
    Jul 8, 2003
  2. Chris Thunell
    Replies:
    3
    Views:
    3,456
    Edward
    Jul 21, 2004
  3. =?Utf-8?B?VGVyb3M=?=

    Dynamic Variables? OR Dynamic Controls

    =?Utf-8?B?VGVyb3M=?=, Aug 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    438
    Scott Allen
    Aug 10, 2004
  4. Replies:
    5
    Views:
    5,629
  5. Raquel

    DiseƱo de controles

    Raquel, Nov 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    189
    Raquel
    Nov 10, 2004
Loading...

Share This Page