4
Answers

Mobile Numbert Validation code as follows

narasiman rao

narasiman rao

11y
16.4k
1


 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)