A potentially dangerous Request. Form value was detected from the client

Asked By 40 points N/A Posted on -
qa-featured

Hi Experts,

It’s regarding JavaScript. As for example <script>alert(“Hello”)</script>.

Whenever I use this code and navigate I find an error message as shown below. It says “A potentially dangerous Request.

Form value was detected from the client (_ctl1=”<script”)”.

I do not understand this message.

Please help me to get a remedy of this issue.

Thanks in advance.

server error in '/code' apllication
SHARE
Answered By 590495 points N/A #144649

A potentially dangerous Request. Form value was detected from the client

qa-featured

 

I’m not that knowledgeable when using JavaScript although I know how to use some of its commands. As for the example you specified in your post, <script>alert(“Hello”)</script>, I’m not sure if you are using the right or correct syntax of the JavaScript command. I know that when declaring the “<script></script>” tags, it is usually like this: <script type="text/javascript">function()</script>, and not like the one you posted.

I assume that the function’s name you are calling is “alert()”. I know it’s legal to insert a text inside the “()” but it should not have double quotes in it. So, it should be declared as <script type="text/javascript"> alert(Hello)</script>. I’m not sure if you are declaring the value Hello as a text by using the double quotes or as a variable without the double quotes. But anyway, just check the proper syntax of the command you are using to fix the error.

Related Questions