c# - create asp.net listbox with click\double click event -
I have tried to create an asp.net listbox in which one click is evet to do this so that i created a project The DLL file that I had added to my toolbox in Visual Studio 2008. this does not work !!!! Here is the code that creates the DLL file:
namespace list_box {public class list_box: listbox, ibitton control • private blog block key validity = true; Personal string strCommandArgument = ""; Personal string strCommandName = ""; Personal string strPostBackUrl = ""; Private string = ""; Private string strValidationGroup = ""; Safe Override Zero 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; }} Click Public Event EventHandler; Zero click_i (object sender, event aRGS) {onclick (new eventArg); } Secure Virtual Zero OnClick (EventArgs e) {if (=!!) {Click_i (it, E); }} Public Program CommandEventHandler Command; Zero Command_i (Object Sender, CommandEventArgs e) {OnCommand (New CommandEventArgs (e)); } Secure Virtual Zero on Commands (CommandEventArgs e) {if (Command! = Null) {Command_i (this, e); }}}}
Help me !!!! I am new to asp.net ....
Two things that you know about your code
-
To work for this, you have to call OnClick from anywhere in your control (whenever you want to fire your event).
-
You have coded circular references in both events
Change it:
< Code> Protected Virtual Zero OnClick (EventAggas E) {if (click! = Null) {click_i (this, e); }}
To do this:
protected Virtual Zero onClick (EventArgs e) {if (=!!) ); }}
and delete it:
zero click_i (object sender, eventArgse e)
then you All this is to be done under your control (anyway, wherever you want the event to fire:
this.OnClick (New EventArgs ());
Comments
Post a Comment