does xhtmlstring property add p tags


I have a page(page1) with property

public virtual XhtmlString DescriptionText { get; set; }

I am rendering the above value onto the other page. But the text is rendered within html p tags

If I have given the input as "This is test" on page1, when I try to render on page2, it is appearing as "

This is test>/p>"

I don't know where the p tags are coming from. I want the output on page2 the same text as page1.

Jun 02, 2016 13:42

text you will be getting back will contain <p> or <div>

Jun 02, 2016 14:25

So do we have have to use regex on page2 to prevent rendering <p> or <div> tags?

Or Is there any other way to get page1 xhtml property value onto page2 without <p> or <div> tags?

Jun 03, 2016 10:55

with assumption its mvc, HTML.PropertyFor should work.

Jun 03, 2016 12:12
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.