Regarding validation

i have one dropdownlist with "Loginid(int)",Loginname(string),Username(string) and a textbox and a button so baseon dropdown selected value how to validate the textbox on button click event in asp.net.