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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Ajax Cascading Dropdown

Ajax Cascading Dropdown

Scheduled Pinned Locked Moved Web Development
database
3 Posts 3 Posters 1 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.
  • K Offline
    K Offline
    K V Sekhar
    wrote on last edited by
    #1

    Hi All, I used Cascading dropdownlists for Coutry & State. I wrote webdervice to fill the dropdownlists. Its all working fine. But when i trying to get SelectedIndex of Dropdownlists, its always giving SelectedIndex as 0 (Zero). ex: int index =ddl_Country.SelectedIndex;//Giving '0' Please suggest me where i went wrong. Thanks in advance, sekhar

    S G 2 Replies Last reply
    0
    • K K V Sekhar

      Hi All, I used Cascading dropdownlists for Coutry & State. I wrote webdervice to fill the dropdownlists. Its all working fine. But when i trying to get SelectedIndex of Dropdownlists, its always giving SelectedIndex as 0 (Zero). ex: int index =ddl_Country.SelectedIndex;//Giving '0' Please suggest me where i went wrong. Thanks in advance, sekhar

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      sekhar.k wrote:

      Please suggest me where i went wrong.

      I'd rather point you in the right direction - to the ASP.NET forum[^].

      1 Reply Last reply
      0
      • K K V Sekhar

        Hi All, I used Cascading dropdownlists for Coutry & State. I wrote webdervice to fill the dropdownlists. Its all working fine. But when i trying to get SelectedIndex of Dropdownlists, its always giving SelectedIndex as 0 (Zero). ex: int index =ddl_Country.SelectedIndex;//Giving '0' Please suggest me where i went wrong. Thanks in advance, sekhar

        G Offline
        G Offline
        Gayani Devapriya
        wrote on last edited by
        #3

        Hi, Just a small suggestion, you can access the SelectedValue property of the first CascadingDropDown control in order to populate the next CascadingDropDown control. Hope it helps, Thx, Gayani

        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