Use a regular expression or an if statement. Something like:
protected void OnSubmit_Click(object sender, EventArgs e)
{
if (textbox.text >= 18 || <= 99)
{
do something
}
else
{
textbox.text = outofrange
}Something to that effect. Could be wrong because I have not wrote a line of code in over a month and a half. On Thu, Mar 12, 2009 at 11:13 AM, Cerebrus <[email protected]> wrote: > > Where's the question ? What is the problem faced ? What have you > tried ? Winforms or Webforms ? > > On Mar 12, 2:41 pm, amravti_ur <[email protected]> wrote: > > hi, please help me, i m trying to use validation on textbox control of > > c#. i want to restrict user to enter values only between 18-99 >
