web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Using htmldecode

(0) ShareShare
ReportReport
Posted on by 2,390

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

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,269 Super User 2026 Season 1 on at

    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.

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    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

  • NavTech Profile Picture
    2,390 on at

    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

  • Verified answer
    keoma Profile Picture
    32,729 on at

    htmldecode converts html encoded signs into readable signs, does not remove the tags. for that you need regex.

  • Verified answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at

    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

  • Verified answer
    Suresh Kulla Profile Picture
    50,269 Super User 2026 Season 1 on at

    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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans