Bijay Dhimal

Bijay Dhimal

  • 1.5k
  • 233
  • 4.7k

How to filter the data in asp.net mvc5?

Sep 10 2017 7:51 AM
If user has enter the data in html formate into the text box like <h2>Something</h2>. .Then how I can filter the data into "Something" and insert into the database in asp.net mvc5.

Answers (1)

1
Manas Mohapatra

Manas Mohapatra

  • 91
  • 20.4k
  • 16.7m
Sep 10 2017 1:00 PM
There are many ways to do it:
 
Use C# code:
 
https://github.com/xoofx/NUglify
 
https://www.codeproject.com/Tips/477066/Extract-inner-text-from-HTML-using-Regex
 
https://consultrikin.wordpress.com/2013/02/21/c-get-plain-text-from-html-string/
 
Use javascript
 
https://ourcodeworld.com/articles/read/376/how-to-strip-html-from-a-string-extract-only-text-content-in-javascript 
Accepted Answer