November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Is there a way to make the user input in an asp:textbox formated with <p></p>? That each paragraphs get <p></p>?
I would use a Regex and put P-elements around text that ends with two line breaks. Replace one line break with BR. I would also store the content as HTML so that editors can view it inside EPi in a Editor-field.
Hi all!
I have front end code like this:
<p>
<%= CurrentPage.MainBody.Replace (Environment.NewLine, "</p><p>" %>
</p>
And back end code that takes the value of an asp:textbox multiline and puts it into MainBody. You would think that the paragraphs should be ok but no. The rendered html code looks like this:
<p> Nunc vel orci vitae lorem placerat tristique. Suspendisse libero nulla, lobortis eu facilisis quis, laoreet non libero. In et velit nulla. Suspendisse potenti. Sed et tellus porttitor risus condimentum cursus ut eget nulla. Etiam eu lacus nisi, id tempus dolor. </p>
<p></p>
<p>Donec ut diam velit, eu rhoncus ante. Cras eget volutpat lorem. In ultrices enim sed est tempor vel egestas ante consectetur. Integer tincidunt vulputate erat, sit amet dapibus nibh rutrum quis. </p>
<p></p>
<p>Aliquam vel placerat justo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras tristique, arcu vel pellentesque congue, felis metus sagittis metus, at pulvinar eros sapien non lectus. </p>
Where do the extra <p></p> with nothing in them come from? Can I get rid of them?
Thanks in advanced!