Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do i allow HTML tags to be submitted in a textbox in asp.net?
    primarykey
    data
    text
    <p>First, I want to let everyone know that I am using an aspx engine not a Razor engine. </p> <p>I have a table within a form. One of my textbox contains html tags like </p> <pre><code>&lt;/br&gt;Phone: &lt;/br&gt; 814-888-9999 &lt;/br&gt; Email: &lt;/br&gt; aaa@gmail.com. </code></pre> <p>When i go to build it it it gives me an error that says </p> <p>A potentially dangerous Request.Form value was detected from the client <code>(QuestionAnswer="...ics Phone:&lt;br/&gt;814-888-9999&lt;br...")</code>.</p> <p>I tried the validation request="false" but it did not work.</p> <p>Im sorry i didn't add my html code for you to look at so far. I am pulling some question up where I can edit it, if need be.</p> <pre><code> &lt;%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage&lt;dynamic&gt;" %&gt; &lt;asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"&gt; EditFreqQuestionsUser &lt;/asp:Content&gt; &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#freqQuestionsUserUpdateButton").click(function () { $("#updateFreqQuestionsUser").submit(); }); }); &lt;/script&gt; &lt;h2&gt;Edit Freq Questions User &lt;/h2&gt; &lt;%Administrator.AdminProductionServices.FreqQuestionsUser freqQuestionsUser = ViewBag.freqQuestionsUser != null ? ViewBag.freqQuestionsUser : new Administrator.AdminProductionServices.FreqQuestionsUser(); %&gt; &lt;%List&lt;string&gt; UserRoleList = Session["UserRoles"] != null ? (List&lt;string&gt;)Session["UserRoles"] : new List&lt;string&gt;(); %&gt; &lt;form id="updateFreqQuestionsUser" action="&lt;%=Url.Action("SaveFreqQuestionsUser","Prod")%&gt;" method="post" onsubmit+&gt; &lt;table&gt; &lt;tr&gt; &lt;td colspan="3" class="tableHeader"&gt;Freq Questions User Details &lt;input type ="hidden" value="&lt;%=freqQuestionsUser.freqQuestionsUserId%&gt;" name="freqQuestionsUserId"/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2" class="label"&gt;Question Description:&lt;/td&gt; &lt;td class="content"&gt; &lt;input type="text" maxlength="2000" name="QuestionDescription" value=" &lt;%=freqQuestionsUser.questionDescription%&gt;" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2" class="label"&gt;QuestionAnswer:&lt;/td&gt; &lt;td class="content"&gt; &lt;input type="text" maxlength="2000" name="QuestionAnswer" value="&lt;%=freqQuestionsUser.questionAnswer%&gt;" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="3" class="tableFooter"&gt; &lt;br /&gt; &lt;a id="freqQuestionsUserUpdateButton" href="#" class="regularButton"&gt;Save&lt;/a&gt; &lt;a href="javascript:history.back()" class="regularButton"&gt;Cancel&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;/asp:Content&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload