Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP.NET - How do I reset a list box's data source to null?

Posted on 2011-03-14
3
Medium Priority
?
615 Views
Last Modified: 2012-05-11
In the image below, the Reports list box is populated when the user selects a value in the Report Category DDL.  I'm working on the code under the Reset Button.  I want to Reset the list box data source to null.  (I want the Reset button to make list box to appear empty.)  How do I do this?
Reset-List-Box.png
0
Comment
Question by:jdana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 35126839
add this code on reset

  ListBox1.DataSource = Nothing
        ListBox1.DataBind()
0
 

Accepted Solution

by:
royshantanu20001 earned 1000 total points
ID: 35126904
Use This,



listBox1.Items.Clear();
0
 

Author Closing Comment

by:jdana
ID: 35126976
Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question