how to validate textbox from not entering any tags like <alert>hello</alert> and others...
so that i would not get Error Message :
A potentially dangerous error from client ..(...)
I want to do this using javascript and also on server side.
Use FilteredTextBox Extender to remove unwanted characters
i cannot use ajax
i have to do it with giving some regualr expression to avoid this.
This way
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate = "TextBox1" runat="server" ValidationExpression = "^[0-9a-zA-Z ]+$" ErrorMessage="Invalid Text"></asp:RegularExpressionValidator> <asp:Button ID="Button1" runat="server" Text="Button" />
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.