how to embed the html code in my ASP.NET webform?
How to embed html code and display the result according to the html code pasted in the textbox multiline asp.net webform..
The example of this is www.orkut.com scrapbook ...
when any body post a graphic comment then it would embed the html coding in scrapbook and he results will be displayed i scrapbook on button submit click ...
Here i开发者_运维技巧s the picture what i want -- i want code snippet for this
If you create a textbox, where people can put HTML tags and on form post you take it into an variable and load it into a Label, it will be rendered by the browser.
lblHtmlRenderer.text = txtTextBox.Text
But you need to be careful as people might post malicious code (cross-side attacks) into your site which would be harmful.
Also you would need to add ValidateRequest="false" in ur <% Page tag (this is also not too good idea).
精彩评论