Posted on: 2/18/2014 5:06:59 PM | Views : 904

I found this nifty code snippet and modified it with my values. Getting this error now: The name cblAuthorsList does not exist in the current context. Confused why since this is on my page. How do I resolve this error?
private void FindAllOfMyString(string searchString) { // Set the SelectionMode property of the ListBox to select multiple items. cblAuthorsList.SelectionMode = SelectionMode.MultiExtended; // Set our intial index variable to -1. int x = -1; // If the search string is empty exit. if (searchString.Length != 0) { // Loop through and find each item that matches the search string. do { // Retrieve the item based on the previous index found. Starts with -1 which searches start. x = cblAuthorsList.FindString(searchString, x); // If no item is found th ...

Go to the complete details ...