How to Format Text in ASP.net ?????????
-
Hi All I have a requirement similar to that seen on codeproject website. I have a requirement which will allow the user to add HTML text in a control(most appropriate Textbox control in multiline mode) and then save it in a file or database.The text will be displayed later when the user visits the page. And I want to allow only some HTML tags not all. For eg Codeproject allows the tag for code and pre
And if I write a script alert("Hello world"); tag is ignored in codeproject. 1.How can I achieve this???? And also when we submit the article on codeproject we add the text in textbox control but when our article is published we see our article on a page not in a control(label). 2.How is this achieved?????????? Please provide guidance for the above two requirements Thanks The SK</x-turndown>
-
Hi All I have a requirement similar to that seen on codeproject website. I have a requirement which will allow the user to add HTML text in a control(most appropriate Textbox control in multiline mode) and then save it in a file or database.The text will be displayed later when the user visits the page. And I want to allow only some HTML tags not all. For eg Codeproject allows the tag for code and pre
And if I write a script alert("Hello world"); tag is ignored in codeproject. 1.How can I achieve this???? And also when we submit the article on codeproject we add the text in textbox control but when our article is published we see our article on a page not in a control(label). 2.How is this achieved?????????? Please provide guidance for the above two requirements Thanks The SK</x-turndown>
Use Regular Expression to select from your html the part you want to show and what you dont want to... Something like this
<TAG\b[^>]*>(.*?)</TAG>
(there are lot to improve in this expression) Choose appropriate regex to select the part to omit. :)Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Windows7 API Code Pack
Simplify Code Using NDepend
Basics of Bing Search API using .NET