Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:20:48+00:00 2026-06-08T08:20:48+00:00

I have a textbox in my ASP.NET 4.5 RC WebForms app which needs to

  • 0

I have a textbox in my ASP.NET 4.5 RC WebForms app which needs to accept potentially HTML.

I have researched this and have done the following to allow this to happen:
In web.config I have set requestValidationMode and validateRequest appropriately.

<httpRuntime requestValidationMode="2.0" enableVersionHeader="false"/> 
<pages enableEventValidation="false" validateRequest="false">

On the control itself I have added the attribute ValidateRequestMode=”Disabled”

<asp:TextBox ID="txtBio" runat="server" TextMode="MultiLine" Height="100" Width="300" ValidateRequestMode="Disabled" />

However, still I get the error:

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

Does anyone have any other ideas for what else I could try? I’m thinking it’s a bug in the ASP.NET 4.5 RC web stack, but I’m probably wrong. It feels that way though as I’m literally out of ideas. Seems like I have flicked every switch now.

Plus, I would prefer to leave requestValidation on for everywhere except this item, however, if I can just turn it off at all, it would be a good start.

Many thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:20:49+00:00Added an answer on June 8, 2026 at 8:20 am

    Try adding validateRequest="false" in the properties at the top of the page like this:

    %@ Page Language="C#" AutoEventWireup="true" CodeBehind="page.aspx.cs" validateRequest="false" Inherits="Project.UI.page" %>
    

    But be careful to check html for any malicious scripts that users may add when validation is off.

    UPDATE:
    Try adding this to your user control codebehind.

    protected void Page_Init(object sender, EventArgs e)
    {
        try
        {
            ((umbraco.UmbracoDefault)this.Page).ValidateRequest = false;
        }
        catch { }
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asp.net TextBox with ontextchanged event this is search text box in my
If I have the following in an ASP.NET Web Form: <asp:TextBox runat=server ID=tbxUser/> and
I have an asp.net TextBox in which I want to check if the text
I have a rich html textbox on my asp.net mvc application. The rich html
I'm using ASP.NET WebForms and using some validation like the following: <asp:TextBox runat=server ID=txtUserName
I have an ASP.NET DataTable which I am populating from another set of ASP:TextBox
I have a textbox in asp.net detailsview. This textbox can only take vehicle number
i have an asp.net form and an asp:textbox. i have a problem when the
I am attaching an asp.net textbox image I want my textbox should have two
How do I handle autopoatback in ASP.NET MVC? Suppose I have a textbox. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.