Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to send button name for method in c#

void button_Click(Object sender,  EventArgs e)
{
    var button = sender as Button;
    if(button != null)
    {
        button.Text = "X";
        button.ForeColor = System.Drawing.Color.Red;
    }

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #send #button #method
ADD COMMENT
Topic
Name
2+4 =