narasiman rao

narasiman rao

  • NA
  • 519
  • 767k

Mobile Numbert Validation code as follows

Dec 27 2012 2:00 AM


 Mobile Number textbox1;


Mobile Number should be 10 Digit validation

if (txt_mobile.Text.Length < 10)
     {
    LblErr.Text = "Enter Correct Mobile Number";
    return;
  }

Mobile Number start with 0 Validation

if (txt_mobile.Text.StartsWith("0"))
      {
     LblErr.Text = "Dont start with Mobile Number 0 ";
        return;
      }


i written  the two validation

But i want that two validation to be written in one condition(like one validtion in that both validation should satisfy)

how to do .

please give the code from my above code.

Answers (4)