---
title: "using script tag in textbox."  
description: "using script tag in textbox."  
author: "Somesh"  
published: 2011-08-24  
updated: 2011-08-24  
canonical: https://www.mindstick.com/forum/290/using-script-tag-in-textbox  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# using script tag in textbox.

hi,\
problem in using [script](https://www.mindstick.com/interview/477/how-can-i-execute-a-php-script-using-command-line) tag (or other [html tag](https://www.mindstick.com/forum/78/how-avoid-the-html-tag-and-remove-the-formating-of-copy-in-ajax-editor)) in [textbox](https://www.mindstick.com/forum/12714/dynamic-textbox-in-gridview) and submit the [page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page) it gives the [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing) as\
\
A potentially dangerous Request.Form [value was detected](https://www.mindstick.com/forum/12799/handling-an-a-potentially-dangerous-request-form-value-was-detected-exception-without-deactivating-validation) from the [client](https://www.mindstick.com/articles/23198/3-steps-to-ensure-that-your-client-portal-is-impeccable) (TextBox1="<script>"). \
\
how to [solve this problem](https://answers.mindstick.com/qa/94681/my-google-assistant-shows-completely-different-search-results-from-what-i-ask-how-can-i-solve-this-problem) \
give the solution of its\
thanks,

## Replies

### Reply by Amit Singh

Hi somesh

You can resolve this [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) by using **javascript escape function** for textbox [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) then submit this value\

### Reply by Chris Anderson

If you are using vs 2008:\
\
write **ValidateRequest="False"** in the page directive.

For vs 2010:\
\
write **ValidateRequest="False"** in the page directive,\
and in web.config file\

```
 <system.web>
<httpRuntime requestValidationMode="2.0"/>
</system.web>
```


---

Original Source: https://www.mindstick.com/forum/290/using-script-tag-in-textbox

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
