≡ Menu

Url regular expression in asp.net

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

{ 0 comments… add one }

Leave a Comment