If you are using asp.net, Use compare validator
<asp:CompareValidator ID="CompareValidator1" runat="server"ControlToValidate="TextBox1" ErrorMessage="Value must be double";CompareValidator"style="top: 70px; left: 418px; position: absolute; height: 19px; width: 113px"Type="Double"></asp:CompareValidator>
If you are using windows form, handle the KeyPress event of the TextBox
for numeric values only.