Learn how to a build a cloud-first strategyRegister Now


Angle brackets "<" and ">" in a text box gives error in c#.net web application.

Posted on 2006-05-21
Medium Priority
Last Modified: 2010-08-05
I m developing a C#.net web app, if i typed "<" or ">" like "<configuration>" in any web text box and press submit button it shows an error

A potentially dangerous Request.Form value was detected from the client (Issues_issue_desc="...ample: <configuration> ...").

Issues_issue_desc is the name of textbox.
Question by:reval1
LVL 35

Accepted Solution

mrichmon earned 500 total points
ID: 16737509
You need to either have javascript HTML encode the textarea so > becomes &gt;

Or you need to tell the site to allow that kind of content through forms and do your own data cleaning before accepting any input.

Assisted Solution

garima_sikarwar earned 500 total points
ID: 16768146
U can use ValidateRequest="false" in the page directive of the page but its not the safe idea..
It would be better to use HTMLEncode  in the javascript..

If u r using ValidateRequest="false" , u will have to check your input page before processing it further. e.g. these charachters cause problem while entered into database..


Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
Suggested Courses
Course of the Month20 days, 19 hours left to enroll

810 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