mMarthaRel9
New Member
I have a .NET C#/Aspx web application in which users fill in fields and the resulting form is emailed out. I have a requirement to allow users to highlight text and then make that text either bold or coloured or both.I have done a bit of searching on the net and found that javascript might be the best option. However, when the script inserts the html tags - it doesn't render within the textbox.I know this is a limitation of the asp.net textbox but is there anyway around this?\[code\]<script type="text/javascript"> function formatText(tag) { var selectedText = document.selection.createRange().text; if (selectedText != "") { var newText = "<" + tag + ">" + selectedText + "</" + tag + ">"; document.selection.createRange().text = newText; }} \[/code\]