hi folks! i tryed to create an asp.net listbox that has a click evet. to do that i created a project that creates a dll file which i added to my toolbox in visual studio 2008. it does not work!!!! here is the code that creates the dll file:
namespace list_box
{
public class list_box : ListBox, IButtonControl
{
private bool blCausesValidation = true;
private string strCommandArgument = "";
private string strCommandName = "";
private string strPostBackUrl = "";
private string strText = "";
private string strValidationGroup = "";
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
this.CssClass = "frmbtn";
}
bool IButtonControl.CausesValidation
{
get
{
return blCausesValidation;
}
set
{
blCausesValidation = value;
}
}
string IButtonControl.CommandArgument
{
get
{
return strCommandArgument;
}
set
{
strCommandArgument = value;
}
}
string IButtonControl.CommandName
{
get
{
return strCommandName;
}
set
{
strCommandName = value;
}
}
string IButtonControl.PostBackUrl
{
get
{
return strPostBackUrl;
}
set
{
strPostBackUrl = value;
}
}
string IButtonControl.Text
{
get
{
return strText;
}
set
{
strText = value;
}
}
string IButtonControl.ValidationGroup
{
get
{
return strValidationGroup;
}
set
{
strValidationGroup = value;
}
}
public event EventHandler Click;
void click_i(object sender, EventArgs e)
{
OnClick(new EventArgs());
}
protected virtual void OnClick(EventArgs e)
{
if (Click != null)
{
click_i(this, e);
}
}
public event CommandEventHandler Command;
void Command_i(object sender, CommandEventArgs e)
{
OnCommand(new CommandEventArgs(e));
}
protected virtual void OnCommand(CommandEventArgs e)
{
if (Command != null)
{
Command_i(this, e);
}
}
}
}
help me!!!! i'm new at asp.net so....