All you need to do here is to
type cast the sender object to a TextBox Control and check to see is the control Id. Something like this..
TextBox ctrl = (TextBox) sender;
if (ctrl != null)
{
if (ctrl.Id.equals("txt1"))
{
}
else if (ctrl.Id.equals("txt2")
{
}
}