query database, create control, display on page

Discussion in 'ASP .Net Web Controls' started by LU, Mar 26, 2005.

  1. LU

    LU Guest

    1)I query database:
    QuestionName | QuestionType
    AwardText1 | TextBox
    AwardMonth1 | DropDown
    AwardYear1 | DropDown
    AwardText2 | TextBox
    AwardMonth2 | DropDown
    AwardYear2 | DropDown
    What is the best way to 'look' at QuestionType, build the correct control,
    and have control over the display of the controls on the page? I want to
    display 3 per line, and in a certain order.
    Thanks
    LU, Mar 26, 2005
    #1
    1. Advertising

  2. I'd suggest using the Table web control to structure your controls together.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net



    "LU" <> wrote in message
    news:...
    > 1)I query database:
    > QuestionName | QuestionType
    > AwardText1 | TextBox
    > AwardMonth1 | DropDown
    > AwardYear1 | DropDown
    > AwardText2 | TextBox
    > AwardMonth2 | DropDown
    > AwardYear2 | DropDown
    > What is the best way to 'look' at QuestionType, build the correct control,
    > and have control over the display of the controls on the page? I want to
    > display 3 per line, and in a certain order.
    > Thanks
    >
    >
    >
    Steve C. Orr [MVP, MCSD], Mar 27, 2005
    #2
    1. Advertising

  3. LU

    LU Guest

    I have questions table
    QuestionName | QuestionType | Group_Order
    AwardText1 | TextBox | 1
    AwardMonth1 | DropDown |2
    AwardYear1 | DropDown |3
    AwardText2 | TextBox |4
    AwardMonth2 | DropDown |5
    AwardYear2 | DropDown |6
    I have a questions details table.
    QuestionName | QuestionDetail | OrderNumber
    AwardMonth1 | June | 1
    AwardMonth1 | July | 2
    AwardYear1 | 2001 | 1
    AwardYear1 | 2002 |2
    I'm trying to create the web control based on the Question table and based
    on the control dropdown/radio/checkbox it will query details table and create
    the web control options.
    I was trying to query questions database, loop through each record, create
    the control, if it is a dropdown/checkbox/radio, query details database and
    create the options for these controls.
    Will this work?
    Is there an easier way to get this done?
    Should I pull both tables into datasets, loop through questions tbl and
    filter the other?
    Trying to move from asp to asp.net.
    thanks

    "Steve C. Orr [MVP, MCSD]" wrote:

    > I'd suggest using the Table web control to structure your controls together.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    >
    > "LU" <> wrote in message
    > news:...
    > > 1)I query database:
    > > QuestionName | QuestionType
    > > AwardText1 | TextBox
    > > AwardMonth1 | DropDown
    > > AwardYear1 | DropDown
    > > AwardText2 | TextBox
    > > AwardMonth2 | DropDown
    > > AwardYear2 | DropDown
    > > What is the best way to 'look' at QuestionType, build the correct control,
    > > and have control over the display of the controls on the page? I want to
    > > display 3 per line, and in a certain order.
    > > Thanks
    > >
    > >
    > >

    >
    >
    >
    LU, Mar 28, 2005
    #3
    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. =?Utf-8?B?U1M=?=
    Replies:
    3
    Views:
    3,830
    Juan T. Llibre
    May 15, 2005
  2. Learner
    Replies:
    1
    Views:
    984
    Marina Levit [MVP]
    Jan 30, 2006
  3. heinz
    Replies:
    2
    Views:
    1,230
    heinz
    Nov 9, 2006
  4. cooldv
    Replies:
    1
    Views:
    142
    Aaron Bertrand [MVP]
    Sep 13, 2003
  5. BOBss

    Query Database, Display as hyperlink

    BOBss, Jun 20, 2007, in forum: ASP General
    Replies:
    3
    Views:
    136
    Adrienne Boswell
    Jun 21, 2007
Loading...

Share This Page