I've got an asp.net text box (ID = "HTMLTextBox_Comments") with an HTMLEditorExtender:
<asp:TextBox ID="HTMLTextBox_Comments" runat="server" Height="200px" Rows="5"
TextMode="MultiLine" Width="469px"></asp:TextBox>
<ajaxToolkit:HtmlEditorExtender ID="HTMLTextBox_Comments_HtmlEditorExtender"
runat="server" Enabled="True" TargetControlID="HTMLTextBox_Comments">
</ajaxToolkit:HtmlEditorExtender>
I'm setting the value of the text box with javascript like this:
var MyControl = document.getElementById("MainContent_HTMLTextBox_Comments"); //this gets the control just fine
MyControl.value = "Here's some text";
If I have an alert show me the value, then it displays "Here's some text", but that text is not displayed in the TextBox itself.
I've also tried setting MyControl.innerHTML
and MyControl.text
but neither of those seem to work either.
How can I display the value of the TextBox in the TextBox?
Thanks in advance!
EDIT I found this post that seems to indicate that .value is what I'm supposed to use to set the text of this TextBox, but it just isn't showing up. What am I missing?