I have a multiline Textbox that can accept HTML Tags.
But links are not allowed as part of the HTML tags that the user can input.
In other words no href tags can be included as values in this textbox.
I need to validate for this.
How do I go about doing this?
I am new to .net and so I dont know how to achieve this.
Please help.
Updated this. I created a asp regularExpression Validator. but it is giving me syntax error.
What am I doing wrong? I am new to .net and Regex. please help.
<asp:RegularExpressionValidator id="EmailLinkValidator" runat="server" controltovalidate="EmailTextBox" display="Dynamic" ValidationExpression="(?m:(?:<a )?href|</a>\r?\n?)" cssclass="clsError" errormessage="<%=this.ERR_MSG%>">*</asp:RegularExpressionValidator>
you can use regular expression to test if the text contains “A” tag
Then it will return a true