This works just fine:
protected void txtTest_Load(object sender, EventArgs e) { if (sender is TextBox) {...} }
Is ther
Try this.
var cont= textboxobject as Control; if(cont.GetType().Name=="TextBox") { MessageBox.show("textboxobject is a textbox"); }