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. clearing a asp:listbox takes too much of time

clearing a asp:listbox takes too much of time

Scheduled Pinned Locked Moved ASP.NET
5 Posts 5 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.
  • S Offline
    S Offline
    sanjubaba
    wrote on last edited by
    #1

    Hi, I am trying to clear the items in listbox using .clear method. but this takes too much of time. currently my listbox contains about 5000 records, but when i try to clear the listbox it takes almost around 1 min. any workaround for this Sandeep Kumbhar

    T S A 3 Replies Last reply
    0
    • S sanjubaba

      Hi, I am trying to clear the items in listbox using .clear method. but this takes too much of time. currently my listbox contains about 5000 records, but when i try to clear the listbox it takes almost around 1 min. any workaround for this Sandeep Kumbhar

      T Offline
      T Offline
      thatraja
      wrote on last edited by
      #2

      Yes it will take some long time to load & clear in web page. I think list-box with around 5000 items not advisable, you may try auto-complete extender or Gridview(with filter/sorting options load dynamically) so that end user can search data entering starting chars. It's just my suggestion.

      thatraja


      Tips/Tricks|Brainbench certifications|Facebook|Twitter

      G 1 Reply Last reply
      0
      • T thatraja

        Yes it will take some long time to load & clear in web page. I think list-box with around 5000 items not advisable, you may try auto-complete extender or Gridview(with filter/sorting options load dynamically) so that end user can search data entering starting chars. It's just my suggestion.

        thatraja


        Tips/Tricks|Brainbench certifications|Facebook|Twitter

        G Offline
        G Offline
        Gaurav Dudeja India
        wrote on last edited by
        #3

        Please try to use javascript , it will take less time.

        Gaurav Dudeja http://www.gdinfotechindia.com
        Dont be afraid of changing your life to better !

        1 Reply Last reply
        0
        • S sanjubaba

          Hi, I am trying to clear the items in listbox using .clear method. but this takes too much of time. currently my listbox contains about 5000 records, but when i try to clear the listbox it takes almost around 1 min. any workaround for this Sandeep Kumbhar

          S Offline
          S Offline
          Satish Mahapatra
          wrote on last edited by
          #4

          Hw abt setting the datasource=null provided u are using the datasource property for binding the listbox.

          1 Reply Last reply
          0
          • S sanjubaba

            Hi, I am trying to clear the items in listbox using .clear method. but this takes too much of time. currently my listbox contains about 5000 records, but when i try to clear the listbox it takes almost around 1 min. any workaround for this Sandeep Kumbhar

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            sanjubaba wrote:

            currently my listbox contains about 5000 records

            You can clear the list box just set the datasource as null if you are binding the list from data source. But, My questions is that why you are binding this amount of Records with your List ? This is seriouly impact performance. Thanks !

            Cheers ! Abhijit Jana | MVP Web Site : abhijitjana.net | Follow Me @ twitter Read my Latest Article :Mastering Debugging in VS 2010

            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