Notifications
Announcements
No record found.
I want to use decode html text so I am trying to use htmldecode function from dot net . I am stuck at defining variable.I could not access System.web . Please help
*This post is locked for comments
Not sure why you are not seeing that namespace.
Check the codeunit Online Map Management and in function URLEncode it uses the same name space but other class, copy that subtype but change it to HtmlDecode.
if namespace system.web is missing, then maybe .net assembly system.web.dll is missing. best you re-install the .net framework.
for details follow: msdn.microsoft.com/.../system.web.httputility.htmldecode(v=vs.110).aspx
Hi Suresh,
Thanks for reply. I tried same you suggested. But still output is same with html tags. I used following statement.
LongTxt :='<p>abc test para1</p><p> xyz test para 2</p>';
Decodedtxt := SystemWebHttpUtility.HtmlDecode(LongTxt);
When I display Decodedtxt in word report . It is printing with HTML Tags
htmldecode converts html encoded signs into readable signs, does not remove the tags. for that you need regex.
If you want to remove the tags then as Jonathan mentioned you required to use regex (.NET Framework Regular Expressions)
msdn.microsoft.com/.../hs600312(v=vs.110).aspx
I thought initial question was how to declare HtmlDecode function, anyhow that function will not remove tags you have to use regular expression logic.
Where do you get a text with html tags and how it isincluded in the word report, describe you requirement may be we suggest some other solutions.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.