protected void Submit_Click(object sender, EventArgs e)
{
string arg = ((Button)sender).CommandArgument;
if (arg.Equals("1"))
{
//抛出DivideByZeroException 异常
int x = System.Convert.ToInt32(TextBox1.Text);
int y = System.Convert.ToInt32(TextBox2.Text);
int z = x / y;
TextBox3.Text = z.ToString();
}
else if (arg.Equals("2"))
......................
阅读全部 | 2012年3月12日 23:27