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. access drop down list on details view

access drop down list on details view

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorialquestion
4 Posts 2 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.
  • S Offline
    S Offline
    sacwchiri
    wrote on last edited by
    #1

    Ive been trying to find a way to access a drop down list value that is within the item template in a details view. This drop down list is conected to a database and i want to recover the value that is loaded when the page loads. So can anyone help me with some clues on how to go about this??

    I 1 Reply Last reply
    0
    • S sacwchiri

      Ive been trying to find a way to access a drop down list value that is within the item template in a details view. This drop down list is conected to a database and i want to recover the value that is loaded when the page loads. So can anyone help me with some clues on how to go about this??

      I Offline
      I Offline
      Ibrahim Bello
      wrote on last edited by
      #2

      Do this: DropDownList ddl = (DropDownList)dtv.Rows[index].FindControl("ddlTemplate"); ddl gets the reference to the dropdown in the item template, i.e ddlTemplate. Let me know how it goes.

      S 1 Reply Last reply
      0
      • I Ibrahim Bello

        Do this: DropDownList ddl = (DropDownList)dtv.Rows[index].FindControl("ddlTemplate"); ddl gets the reference to the dropdown in the item template, i.e ddlTemplate. Let me know how it goes.

        S Offline
        S Offline
        sacwchiri
        wrote on last edited by
        #3

        yeah thanks that worked like a charm :) now i get that find control returns the controls reference.

        I 1 Reply Last reply
        0
        • S sacwchiri

          yeah thanks that worked like a charm :) now i get that find control returns the controls reference.

          I Offline
          I Offline
          Ibrahim Bello
          wrote on last edited by
          #4

          Glad that worked for you :)

          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