Dnx Posted May 3, 2005 Posted May 3, 2005 hi everyone i need to convert a text in RTF format into a normal text for example, i have a string that contain this : {\rtf1\ansi\ansicpg1252\deff0\deflang2060{\fonttbl{\f0\fnil\fcharset0 Arial;}} \viewkind4\uc1\pard\b\fs20 Bruxelles: deux jours apr\'e8s la journ\'e9e internationale de la femme, Suzanne Moubarak a \'e9t\'e9 re\'e7ue au S\'e9nat par la pr\'e9sidente Anne-Marie Lizin; pr\'e9sidente du mouvement Women for Peace, l'\'e9pouse du pr\'e9sident \'e9gyptien milite activement pour l'\'e9galit\'e9 entre les hommes et les femmes.\b0\fs20 \par } how can i transform this into a normal text best regards Quote
bri189a Posted May 3, 2005 Posted May 3, 2005 This might be better posted in the windows section as ASP typically doesn't mess with it...haven't tried it and I'm sure someone can shoot me down, and this definitely I don't think would be a preferred approach, but off the top of my head, create a richtext text box object...think there is one of those in the windows forms (don't mess with forms much)...assign the rtf text to your value and then pull the text value, not even sure if those properties exist for that control but if I was in the situation that's were I'd start. There maybe a class in the System.Text namespace that may do it too or somewhere else, but at least this will give you some ideas to look at until a forms guru takes a look at your post. Quote
*Experts* DiverDan Posted May 3, 2005 *Experts* Posted May 3, 2005 The simple way is to copy the RTF code to a virtual RTF Box and access its text value. Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Dnx Posted May 4, 2005 Author Posted May 4, 2005 how can i do that "to create RTFBOX(winform) into an aspx.vb file"? Quote
*Experts* DiverDan Posted May 4, 2005 *Experts* Posted May 4, 2005 Where on your post do you mention that you are using ASP and not a WinForm? Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Dnx Posted May 4, 2005 Author Posted May 4, 2005 i have posted in the ASP.NET section and i don't know why they have moved my post because if i put the VB.NET tag in the ASP.NET section... it's webform :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.