Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:17:40+00:00 2026-06-12T01:17:40+00:00

My application is ASP.NET MVC2 C#, I am using Telerik MVC Editor and itextsharp

  • 0

My application is ASP.NET MVC2 C#, I am using Telerik MVC Editor and itextsharp to produce a PDF file. My challenge is <br /> shows in the PDF rather than a new paragraph.

In the editor I have:

.Encode(false)

In the controller I am using:

er.Comments = HttpUtility.HtmlDecode(recommendation.Comments);

so far everything works well.

To produce my PDF, I am using:

BPR = HttpUtility.HtmlEncode(this.Recommendations.**Comments**)
List<IElement> htmlarraylist = iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(new StringReader(BPR ), null);

Comments is stored as in the database as:

First Paragraph <br /> Second paragraph

However when I debug the program, BPR is converted to:

First Paragraph &lt;br /&gt; Second paragraph

Is there a way to convert &lt;br /&gt; back to <br/>?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:17:41+00:00Added an answer on June 12, 2026 at 1:17 am

    The problem was in this line:

    BPR = HttpUtility.HtmlEncode(this.Recommendations.Comments)
    

    Since I getting the values from a database some of the data were already encoded.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on asp.net mvc application using the mvc2 framework. Here is the
I created a sample MVC application using following Template. ASP.NET MVC2 Empty Web Application
I have an asp.net mvc2 application that is using StructureMap 2.6 and NHibernate 3.x.
I'm using xval to use client side validation in my asp.net mvc2 web-application. Despite
For an ASP.NET MVC 2 application, we are using HttpContext.User.Identity.Name to get the user
I am working on a Facebook tab application. I am using asp.net MVC 2
I am running a asp.net mvc2 application on iis7.5 using a SSL certificate for
I'm building ASP.NET MVC2 application, and using Entity Framework as ORM. I am having
I have an ASP.net MVC2 application. In wich I'm using JQuery to alter all
I'm using Moq to help in testing my ASP.NET MVC2 application. Problem: ArgumentException was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.