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

  • Home
  • SEARCH
  • 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 8123099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:03:52+00:00 2026-06-06T06:03:52+00:00

I have a Multiline Textbox . I donot want to let user type HTML

  • 0

I have a Multiline Textbox. I donot want to let user type HTML Tags or validation can be done in the server side. Any suggestions?

When I set ValidateRequest="true" it throws error

potentially dangerous Request.Form value was detected from the client

This is also not required. I tried to put validation by checking the character < but this is also not a proper validation because you can type like <kanavi and this is not a HTML tag

  • 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-06T06:03:54+00:00Added an answer on June 6, 2026 at 6:03 am

    set ValidateRequest="false"

    and handle on the server if there is a tag in input show message.

    you can remove the tags

     Regex.Replace(source, "<.*?>", string.Empty);
    

    OR you use encoding if you want to keep them

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a multiline textbox : <asp:TextBox ID=txtBody runat=server TextMode=MultiLine Rows=10 Width=95% /> In
I have a multiline textbox that contains very long text in it. How can
In silverlight, I got a textbox which I want to be multiline and have
I want to have a multiline textbox of max of 3 rows and I
I have a MultiLine asp:Textbox (a standard html textarea for those non-asp people) that
I have a multiline textbox, and by default it has rows=2. But I want
I have a TreeView and a multiline TextBox. When user clicks on a node
I have a textbox with multiline enabled, and want to add a string at
I want to have a multiline textbox to display data in a DataGridView. I
I have a Multiline Textbox. <asp:TextBox ID=tx runat=server TextMode=MultiLine></asp:TextBox> How to remove the stretchable

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.