Etienne
Etienne

Reputation: 7201

Return value from database without the HTML tags?

In my database MYDB I have a table called MYTABLE and I have a column called Description. I am saving a long description in there with multiple HTML tags.

How can i return the values and not include all the HTML tags?

Is this even possible? What will be the best way of doing this? In the SQL statement or in code behind? And how will I do it?

Upvotes: 0

Views: 464

Answers (2)

James
James

Reputation: 82136

You are going to have to use some form of HTML parsing. If it is for basic HTML parsing then some form of Regex should suffice. However, for more advanced parsing you should look at something like HtmlAgilityPack. I use this to parse emails and I must say it works pretty well.

Upvotes: 0

Related Questions