我有5個按鈕將調用此彈出功能發送電子郵件。我怎樣才能找出哪個點擊按鈕稱爲功能?多個按鈕調用相同的函數。可以找出哪個按鈕稱爲函數?
public void popup(object sender, EventArgs e)
{
if (MessageBox.Show("You may not Bind, Change, Or Alter Insurance Coverage through e-mail. Confirmation of this e-mail by us initiates any changes to your Insurance. If you need any immediate service please contact our office at 1-800-875-5720.", "IMPORTANT!", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
{
string email = "mailto:[email protected]";
Process.Start(email);
}
}
}
System.Web.UI.WebControls.Button或System.Windows.Forms.Button – Snake3ite 2012-04-06 13:57:16
@ Snake3ite是WPF還是WinForms? – Yahia 2012-04-06 13:58:21
System.Web.UI.WebControls.Button用於Web應用程序; System.Windows.Forms.Button用於WinForms應用程序,System.Windows.Controls.Button用於WPF應用程序。 – Joe 2012-04-06 14:06:17