Url Vaildator in asp.net

by Ali Raza Zaidi on January 13, 2007

buddy here is regular expression for Url Vaildation

“http://([w-]+.)+[w-]+(/[w- ./?%&=]*)?”

asp.net control would be look like

<asp:RegularExpressionValidator ID=”RegularExpressionValidator1″ ControlToValidate=”XYZl” ValidationExpression=”http://([w-]+.)+[w-]+(/[w- ./?%&=]*)?” runat=”server” ErrorMessage=”Invalid URL”></asp:RegularExpressionValidator>

enjoy

Comments on this entry are closed.

Previous post:

Next post: