这很好用:
protected void txtTest_Load(object sender, EventArgs e) { if (sender is TextBox) {...} }
有没有办法检查发件人是不是TextBox,某种等同于!= for"is"?
请不要建议将逻辑移到ELSE {} :)
c# asp.net .net-2.0
.net-2.0 ×1
asp.net ×1
c# ×1