Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Dynamically creating and positioning controls

Dynamically creating and positioning controls

Scheduled Pinned Locked Moved ASP.NET
questionsysadmintutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohammad A Gdeisat
    wrote on last edited by
    #1

    Hi all, I am creating a type of control that is used to display fill-in-blank questions, the control will have a drop down list in the location of each blank with 4 options to choose from, like this The elephant [is, are, us, we] a very big Mammal that [eat, eating, eats, ate] plants... [is, are, us, we] = drop down list with 4 options that the student uses to choose the best answer. The question is how to dynamically create drop down server controls AND position them in the correct place within the words of the paragraph? Any ideas? Thanks :-)

    And ever has it been that love knows not its own depth until the hour of separation Mohammad Gdeisat

    N N 2 Replies Last reply
    0
    • M Mohammad A Gdeisat

      Hi all, I am creating a type of control that is used to display fill-in-blank questions, the control will have a drop down list in the location of each blank with 4 options to choose from, like this The elephant [is, are, us, we] a very big Mammal that [eat, eating, eats, ate] plants... [is, are, us, we] = drop down list with 4 options that the student uses to choose the best answer. The question is how to dynamically create drop down server controls AND position them in the correct place within the words of the paragraph? Any ideas? Thanks :-)

      And ever has it been that love knows not its own depth until the hour of separation Mohammad Gdeisat

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Easy way is to put this inside a template column of a GridView. ASP.NET will maintain the viewstate for all the dropdowns.

      Navaneeth How to use google | Ask smart questions

      M 1 Reply Last reply
      0
      • N N a v a n e e t h

        Easy way is to put this inside a template column of a GridView. ASP.NET will maintain the viewstate for all the dropdowns.

        Navaneeth How to use google | Ask smart questions

        M Offline
        M Offline
        Mohammad A Gdeisat
        wrote on last edited by
        #3

        What about positioning the controls between the words in the paragraph?

        And ever has it been that love knows not its own depth until the hour of separation Mohammad Gdeisat

        1 Reply Last reply
        0
        • M Mohammad A Gdeisat

          Hi all, I am creating a type of control that is used to display fill-in-blank questions, the control will have a drop down list in the location of each blank with 4 options to choose from, like this The elephant [is, are, us, we] a very big Mammal that [eat, eating, eats, ate] plants... [is, are, us, we] = drop down list with 4 options that the student uses to choose the best answer. The question is how to dynamically create drop down server controls AND position them in the correct place within the words of the paragraph? Any ideas? Thanks :-)

          And ever has it been that love knows not its own depth until the hour of separation Mohammad Gdeisat

          N Offline
          N Offline
          neer_ajmer
          wrote on last edited by
          #4

          DropDownList ddl = new Dropdownlist(); pnl.control.add(ddl);

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups