Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
requestvalidationmode 4 5 vs 2 0 using -'asp.net,asp.net-4.5'
requestvalidationmode 4 5 vs 2 0 ¬†using -'asp.net,asp.net-4.5'
Is there a difference between requestValidationMode="4.5" and requestValidationMode="2.0"? ¬†I have a .net 4.5 application, there is a control which I don't want to validate, as users can enter html tags in:
<asp:TextBox ID="txtTitle" runat="server" ValidateRequestMode="Disabled" />
in my web.config i have:
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5">...</compilation>
<httpRuntime targetFramework="4.5" requestValidationMode="2.0" ¬†/>
initially I have put requestValidationMode="4.5" but that didn't work, I would still get the error about the tags - "A potentially dangerous Request.Form value was detected from the client ..." as soon as would submit the form. However if I set it to requestValidationMode="2.0" it works, i'm able to hit the PageLoad and encode the value from that field.
Sep 7, 2015
to add a comment.
Related Hot Questions
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please