Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
How to prevent a HTTP link in asp.net....for the Name field,description field etc...
Posted
Comments
Prasad_Kulkarni 30-Apr-12 7:12am    
Can you please elaborate some more, its not clear enough
Sandeep Mewara 30-Apr-12 8:16am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.
_Zorro_ 30-Apr-12 10:59am    
The only thing that cames to my mind with that question would be javascript:void(0);
ZurdoDev 30-Apr-12 11:19am    
Reason for my vote of 1
Your question does not make any sense. _Zorro_ may have the closest guess.
Sergey Alexandrovich Kryukov 30-Apr-12 12:17pm    
Reason for my vote of 1
Makes no sense.
--SA

1 solution

I guess you want to prevent your users from entering something like
HTML
<a href="http://www.spammer.com">Great Spam</a> 

into some text fileds of your pages.
There are some things you could try:
- filter out any <> by JavaScript
- filter out any <> in the code behind or change them to &lt; etc.
- try some more elaborate parsing with regular expressions to detect links
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900