I have to redefine the ListBox class to make sure that it returns a csv string of all the selected items and also should take in a csv string and populate the listbox when needed. Lets say I have this code. What are the functions that I have to override and how do I do it?
using System;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace MY.WebControl
{
public class ListBoxString : ListBox
{
}
}
If all you want to do is add functionality, you can also add Extension Methods to add this capability. Here are 2 quick examples that GetSelectItems to a CSV string and AddListItems from a string array.