Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
12-01-2005, 04:55 PM #1
- Join Date
- Nov 2005
- Thanked 0 Times in 0 Posts
Convert Rich Text to display in an image's alt element - help!
I'm new to web development and I've run into a problem with the ASP.Net Web application that i'm developing and am hoping someone can help.
I'm querying an SQL server database table that holds some text in rtf format. I need to display this text in a tooltip (caption) when a user hovers over an image on the web page. I've had some success with this by populating a windows rtf control with the rtf text (server side) and using the control's text property to then retrieve the plain text. I then populate the alt element for the image with the plain text and it works. Well almost, every so often i run into COM exceptions thrown up by the windows rtf control. I'm not too sure why but am pretty certain that i'm disposing of the rtf control ok.
Anyway i don't think i should be using the windows control this way but can't find an alternative. Can anyone help?
Does anyone know how can i convert the rich text to plain text in my web application?