how to validate if hyphen is present in the beginning or at the end? I've done:
Display="Dynamic" SetFocusOnError="true" ErrorMessage="*Enter Only Alphanumeric characters" ValidationExpression="^[0-9a-zA-Z-]+$">
this checks only for hyphen but I've to check whether the hypen is present in the beginning or at the end, if so generates error.
so correct inputs are ::
1243-adfsda
fjld-303-ljsdl-3o32
invalid inputs ::
-dfds-322 (present at the beginning)
jlsd-8080- (present at the end)
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Guest UserRank #816 · 2.8K reputationPosted Jun 23, 2015, 12:58 AM EDT