Click here to Skip to main content
15,888,301 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys


I am in a serious trouble.. I am trying to display the contents from a database in a div which is inside a <table><tbody><tr><td>.. The values are entered in BB code editor and if there is only plain text , a <pre> tag is added to make it readable.. But the presence of <pre> tag makes my design worse as am not able to wrap the text... Is there a way to remove <pre> and display the rest of the message.
Posted
Updated 19-Jul-12 20:17pm
v2
Comments
Arjun Menon U.K 20-Jul-12 2:12am    
But now the problem is that the word-wrap attribute of CSS is not functioning :(
Sandeep Mewara 20-Jul-12 2:18am    
Use Improve Question link to edit/update your question. Don't post as answers.
Arjun Menon U.K 20-Jul-12 2:53am    
OK
Arjun Menon U.K 20-Jul-12 2:57am    
I used Contains method in C# to find the <pre> and Replace Method to replace it ...But now the correct format is not maintained.. <pre> tag is used to maintain the format know but the problem is when i use <pre> tag my design wrecks is there a way to maintain the format and contain it in in my <div> in a reasonable way?
Christian Graus 20-Jul-12 18:24pm    
It's a string, so I do't know what you mean by 'maintain format'. If a pre was added, removing it will give you what you started with. Perhaps you need to explain more ?

1 solution

You can just use the string.Replace method to remove the pre tag if you want to. I think you did that, but your comments have been deleted.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900