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 6855735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:47:44+00:00 2026-05-27T01:47:44+00:00

I have created a textbox for my users to enter their comments. So, sometimes

  • 0

I have created a textbox for my users to enter their comments. So, sometimes they copy the error that has been raised in the application and paste in the textbox along with comments. It may include illegal characters (eg. </11>) but it should be saved but my .aspx is not allowing. I don’t know how to handle this. 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-05-27T01:47:45+00:00Added an answer on May 27, 2026 at 1:47 am

    If you want user to edit TextBox and enter html tags you can disable this via

     <%@ Page validateRequest="false" ...>
    

    or in the web.config for your entire application:

    <system.web>
      <page validateRequest="false" />
    </system.web>
    

    Note that this ValidateRequest property is not existing without
    reason. When you change its default value, insecure input will be
    accepted. Because of that, you need to validate every user’s input to
    avoid cross-site scripting attacks, like inserting of malicious
    JavaScript, ActiveX, Flash or HTML


    Another smart solution is to replace via javascript text written by user to make it safe for validation.
    < anyword> , instead of <anyword> is considered safe!

    function validateTxt() {
        $("textarea, input[type='text']").change(function () {
          html = $(this).val(); //get the value
          //.replace("a" , "b")  works only on first occurrence of "a"
          html = html.replace(/< /g, "<"); //before: if there's space after < remove
          html = html.replace(/</g, "< "); // add space after <
          $(this).val(html); //set new value
       });
    }
    
    $(document).ready(function () {
          validateTxt();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using system.net.mail and have a textbox that users can enter their email address
I have created a simple win 32 application..in which it has a textbox and
I have created a UserControl that has a ListView in it. The ListView is
I have created a textbox in a Windows Forms application that starts out at
I have a textbox that I want the user to enter an integer in.
I have created a UserControl called AutorControl with a method to clear its textbox:
I'm creating a login page. I want to create ASP.NET TextBox controls that have
I have created a PHP-script to update a web server that is live inside
I have a special content-type that I have created, and one of the fields
I need to create a textbox that a user can enter an arbitrary string

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.