Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Remove HTML tags from Textbox w/o turning off ValidateRequest

Posted on 2006-10-19
2
Medium Priority
?
342 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

926 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