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. adding item in listbox using delegate

adding item in listbox using delegate

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

    Hello everyone, Im having a problem regarding in adding item in a listbox when im invoking a delegate. this code is in an ascx file. this is my codes:

    Public Delegate Sub addLstBoxDel(ByVal fileFound As String)
    Public Sub addLstBox(ByVal fileFound As String)
    lstResult.Items.Add(fileFound)
    End Sub

    Dim ALBDelegate As me.addLstBoxDel
    ALBDelegate = AddressOf Me.addLstBox

    ALBDelegate.Invoke(file)

    Thanks in advance,

    jyn

    B 1 Reply Last reply
    0
    • J jhyn

      Hello everyone, Im having a problem regarding in adding item in a listbox when im invoking a delegate. this code is in an ascx file. this is my codes:

      Public Delegate Sub addLstBoxDel(ByVal fileFound As String)
      Public Sub addLstBox(ByVal fileFound As String)
      lstResult.Items.Add(fileFound)
      End Sub

      Dim ALBDelegate As me.addLstBoxDel
      ALBDelegate = AddressOf Me.addLstBox

      ALBDelegate.Invoke(file)

      Thanks in advance,

      jyn

      B Offline
      B Offline
      Barbo
      wrote on last edited by
      #2

      init the delegate using 'New'

      J 1 Reply Last reply
      0
      • B Barbo

        init the delegate using 'New'

        J Offline
        J Offline
        jhyn
        wrote on last edited by
        #3

        Barbo, Thanks to your reply. I already add New but still listbox is not updated. i put the init of delegate on page.init and page.load but still no luck. i so added postback=true on listbox. Thanks again,

        jyn

        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