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

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
jdanaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
royshantanu20001Connect With a Mentor Commented:
Use This,



listBox1.Items.Clear();
0
 
Pratima PharandeCommented:
add this code on reset

  ListBox1.DataSource = Nothing
        ListBox1.DataBind()
0
 
jdanaAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.