Reputation: 23
I have implemented CKEditor on my Visual Studio 2013 and it has been showed clearly with asp:TextBox
element.
But somehow while I fetch the value it returns empty.
This is my code:
<div class="row">
<div class="col-md-11">
<asp:TextBox ID="bodyMessageTextBox" runat="server"/>
<script type="text/javascript">
CKEDITOR.replace("ctl00_ContentPlaceHolder1_bodyMessageTextBox");
</script>
</div>
</div>
I fetch with this method;
_msemailsetup.BodyMessage = this.bodyMessageTextBox.Text;
Can someone help me solve this?
Upvotes: 2
Views: 714
Reputation: 2318
You will get the data with below code :
Inspect (press f12 on browser) the browser and then check the name of editor
var editorText = CKEDITOR.instances.bodyMessageTextBox.getData();
_msemailsetup.BodyMessage = editorText ;
Upvotes: 3