Hi,
Im using this code to put breaklines in asp:textbox, but the thing i dont like is, that when i edit the data, the br are seen.
does anyone has a better code and that are saved in db, but if you edit the data text will be in next line but without <br>
Im using this code to put breaklines in asp:textbox, but the thing i dont like is, that when i edit the data, the br are seen.
Code:
<script type="text/javascript">
<!--
function changeTextBoxValue(elementRef) {
var textBoxValue = elementRef.value;
while (true) {
var currentValue = textBoxValue;
textBoxValue = textBoxValue.replace(\n, <br />);
if (textBoxValue == currentValue)
break;
}
elementRef.value = textBoxValue;
}
// -->
</script>
does anyone has a better code and that are saved in db, but if you edit the data text will be in next line but without <br>