Solved

Remove HTML tags from Textbox w/o turning off ValidateRequest

Posted on 2006-10-19
2
320 Views
Last Modified: 2008-02-01
I know when a user tries to add HTML like tags in a text box, an error will occur if ValidateRequest is turned off....however there are some security implications when this is turned off....I know how to remove HTML tags using RegEx, but I don't know how to remove the HTML before the validaterequest throws an error.

Any Ideas? I want to just remove the HTML so the text being posted will be valid. Thanks!
0
Comment
Question by:Skytide
2 Comments
 
LVL 18

Accepted Solution

by:
tusharashah earned 500 total points
ID: 17768011
You can do this using JavaScript at client side before data is submitted to server, here are couple of links on this topic:
  - http://www.codeproject.com/aspnet/SubmissionHijack.asp?df=100&forumid=86607&exp=0&select=921475
  - http://weblogs.asp.net/mhawley/archive/2004/03/15/89762.aspx
0
 

Author Comment

by:Skytide
ID: 17768688
Thanks!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now