protected function txtItem_KeyPress() { // Update the Label $this->lblSelected->Text = trim($this->txtItem->Text); }