0

I have asp.net website. I am showing data in ListView control from database and everything working fine.

finally ,i added search button to search from the database and i want to show the result in the same ListView.

my question is : how i can refresh my ListView with search results ??

thanks in advance,

1
  • please post your code and HTML Commented Mar 4, 2015 at 12:08

1 Answer 1

1

Hoping that you can implement the steps easily in the code.

  1. Create an click event for the search button
  2. In the Click event (Code behind file) write the code to search for data in the database as per your search criteria.
  3. Assign the searched data to the ListView (using ListviewId.DataSource)
  4. Call DataBind() function of ListView (It will bind the searched data with LisView)

That's all.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your reply, the above steps working when we call data to the listview in the first time , but when we want to refresh listview data with new data that's not working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.