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. General Programming
  3. C#
  4. Plz help me to display on Dropdownlist

Plz help me to display on Dropdownlist

Scheduled Pinned Locked Moved C#
helpdatabase
5 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.
  • P Offline
    P Offline
    P_Elza
    wrote on last edited by
    #1

    Hi all I have a problem. Am tring to display data on dropdown list, i have two dropdown list. i'm displaying data on both from database. when the application starts running the first ddl will list out some data. when we select one the second ddl will display data according to that. but here the problem is, when i select one on first ddl, it is automaticaly errasing all the datas..... i havint given any where clear command. y it ts not displaying. the problem i nly when it is connected to database. i tried a sample, it is working. plz help me....

    C 1 Reply Last reply
    0
    • P P_Elza

      Hi all I have a problem. Am tring to display data on dropdown list, i have two dropdown list. i'm displaying data on both from database. when the application starts running the first ddl will list out some data. when we select one the second ddl will display data according to that. but here the problem is, when i select one on first ddl, it is automaticaly errasing all the datas..... i havint given any where clear command. y it ts not displaying. the problem i nly when it is connected to database. i tried a sample, it is working. plz help me....

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Is this an ASP.NET app ? Are you binding to your datasource on postback ?

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )

      P 1 Reply Last reply
      0
      • C Christian Graus

        Is this an ASP.NET app ? Are you binding to your datasource on postback ?

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )

        P Offline
        P Offline
        P_Elza
        wrote on last edited by
        #3

        no i have written the code inside if (!IsPostBack)

        C 1 Reply Last reply
        0
        • P P_Elza

          no i have written the code inside if (!IsPostBack)

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          And have you stepped through the code in the debugger to see at what point it loses it's values ? Is viewstate turned off ? If that's the case, then you will lose your values, as you've described.

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )

          P 1 Reply Last reply
          0
          • C Christian Graus

            And have you stepped through the code in the debugger to see at what point it loses it's values ? Is viewstate turned off ? If that's the case, then you will lose your values, as you've described.

            Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )

            P Offline
            P Offline
            P_Elza
            wrote on last edited by
            #5

            no... viewstate is on only i tried to debug the cod the control is not going to private void DdlCustomer_SelectedIndexChanged(object sender, System.EventArgs e) y is it so....

            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