I have feedback panel where user can write HTML formated feedback using AJAX HTMLEditor
I want to save this HTML DATA in SQL server
HTML SOURCE
This is <span style="font-weight: bold; ">nice</span> question
HTML OUTPUT
This is nice question
Now how can i search to my database if your find "is nice" then my query can not response is nice because database contains HTML tags too.
So what are best practices to save and retrieve HTML data using SQL Query & ASP.net.
You might get some mileage out the SQL Server's full-text search capability. Here is a resource that describes strategies to apply full-text search to HTML text stored in SQL Server:
http://www.developmentnow.com/blog/SQL+Server+2005+Full+Text+Search+On+HTML+Documents.aspx
If you're using SQL Server 2008 then full-text indexing is a good option. Store your HTML in a varbinary(max) column and set its associated file type to ".html" in a file type column. The full-text indexer will parse the data as HTML and search only the text content while ignoring the HTML tags.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With