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. web user control(dropdownlist)

web user control(dropdownlist)

Scheduled Pinned Locked Moved ASP.NET
question
4 Posts 4 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.
  • B Offline
    B Offline
    billcodes
    wrote on last edited by
    #1

    hi, I hvae created a web user control dropdownlist in a .ascx file.Then I dragged it into a .aspx file.It is showing the items of dropdownlist.But I can't get the selected item value in .aspx page.How can I get it? regards, Bill

    S C 2 Replies Last reply
    0
    • B billcodes

      hi, I hvae created a web user control dropdownlist in a .ascx file.Then I dragged it into a .aspx file.It is showing the items of dropdownlist.But I can't get the selected item value in .aspx page.How can I get it? regards, Bill

      S Offline
      S Offline
      SayreCC
      wrote on last edited by
      #2

      Hi, you must have public property to get the value of your U.C. dropdownlist. example: public str as string = ddl.selecteditem.value

      Hope this one can help. Thanks Hi, Please select Good Question if my answer are fit to your Question.

      S 1 Reply Last reply
      0
      • B billcodes

        hi, I hvae created a web user control dropdownlist in a .ascx file.Then I dragged it into a .aspx file.It is showing the items of dropdownlist.But I can't get the selected item value in .aspx page.How can I get it? regards, Bill

        C Offline
        C Offline
        CrazyCoder26
        wrote on last edited by
        #3

        Just write a Public Property in .ascx file. For example :

             public string GetSelectedValue
               {
                 get{return DropDownlist1.SelectedValue;}
               }
        

        ARINDAM

        1 Reply Last reply
        0
        • S SayreCC

          Hi, you must have public property to get the value of your U.C. dropdownlist. example: public str as string = ddl.selecteditem.value

          Hope this one can help. Thanks Hi, Please select Good Question if my answer are fit to your Question.

          S Offline
          S Offline
          saanj
          wrote on last edited by
          #4

          Hi, Follow the given link: http://www.daniweb.com/forums/thread141469.html

          Either you love IT or leave IT...

          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