Validate URL
Validate URL
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationExpression="(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?" ControlToValidate="TextBox1" ErrorMessage="Input valid Internet URL!" ></asp:RegularExpressionValidator>
Here i update the Regex this will accept the URL like:
http://regxlib.com/Default.aspx | http://electronics.cnet.com/electronics/0-6342366-8-8994967-1.html
Read more »