This works just fine:
protected void txtTest_Load(object sender, EventArgs e) { if (sender is TextBox) {...} }
Is ther
This is one way:
if (!(sender is TextBox)) {...}