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. display in the listbox

display in the listbox

Scheduled Pinned Locked Moved ASP.NET
help
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.
  • O Offline
    O Offline
    Oga M
    wrote on last edited by
    #1

    Hello can you please help me.After the user selected the project from dropdownlist,I want the name of all the members working under that project to be displayed in the listbox.Please help me with the code for that. oga m

    N M I 3 Replies Last reply
    0
    • O Oga M

      Hello can you please help me.After the user selected the project from dropdownlist,I want the name of all the members working under that project to be displayed in the listbox.Please help me with the code for that. oga m

      N Offline
      N Offline
      NanaAM
      wrote on last edited by
      #2

      Attach SelectedIndexChanged event to the dropdown. And in the event connect to database to get all members

      Nana

      1 Reply Last reply
      0
      • O Oga M

        Hello can you please help me.After the user selected the project from dropdownlist,I want the name of all the members working under that project to be displayed in the listbox.Please help me with the code for that. oga m

        M Offline
        M Offline
        Member 3879881
        wrote on last edited by
        #3

        Private Sub dropdownlist1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dropdownlist1.SelectedIndexChanged dst = New DataSet sqldad = New SqlDataAdapter("SELECT employee from tablename where projectname=val(dropdownlist1.selecteditem.value)", sqlconn) sqldad.Fill(dst) dst.Tables(0).TableName = "tblMainGRD" If dst.Tables("tblMainGRD").Rows.Count > 0 Then Me.btnSubmitStock.Visible = True listbox1.DataSource = dst listbox1.DataBind() Else Me.btnSubmitStock.Visible = False listbox1.DataSource = Nothing listbox1.DataBind() End If sqldad.Dispose() dst.Dispose() End Sub:)

        Magesh

        1 Reply Last reply
        0
        • O Oga M

          Hello can you please help me.After the user selected the project from dropdownlist,I want the name of all the members working under that project to be displayed in the listbox.Please help me with the code for that. oga m

          I Offline
          I Offline
          Irshad Sulaimani
          wrote on last edited by
          #4

          Under SlectedIndexChanged event of dropdownlist write the code. Based on the selected value of the dropdownlist, fetch the name of all the members from database and then bind the datalist with the data retrieved.

          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