there is no need of selecting , the property txtIpB.Text itself contains the text you want to select...