I would Like to use a function with parameters on the properties box with event list. this even list box on the right int he visual studio only allows some functions with object sender and eventargs e, and doesn’t show a custom function with parameters. Is this a general behavior or should I look for an error?
Share
You can simply use the
CommandArgumentof your button.yourButton.Click += new EventHandler(yourButton_Click);
yourButton.CommandArgument = "your parameters";
and in the event handler method do the following:
string yourParameters = (sender as Button).CommandArgument.ToString()
Hope this helps.