This is a migrated thread and some comments may be shown as answers.

Content, Text and Html all returns empty string?

2 Answers 28 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 25 Aug 2015, 06:30 PM

I have a RadEditor in form view like this:

<telerik:RadEditor runat="server" ID="txtNote" OnDataBinding="txtNote_DataBinding" OnExportContent="txtNote_ExportContent" Height="180px" Width="100%" EditModes="Design">
                                            <Tools>
                                                <telerik:EditorToolGroup>
                                                    <telerik:EditorTool Name="Cut" />
                                                    <telerik:EditorTool Name="Copy" />
                                                    <telerik:EditorTool Name="Paste" />
                                                </telerik:EditorToolGroup>
                                            </Tools>
                                        </telerik:RadEditor>

 ​For whatever reason, this always return empty string

                var txtNote = (fv.FindControl("txtNote") as RadEditor);
                if (txtNote.Text == "") // this is always true

I also try Content, Html, GetHtml() and they are all the same.

 

2 Answers, 1 is accepted

Sort by
0
Edward
Top achievements
Rank 1
answered on 25 Aug 2015, 06:37 PM
Just tested - it is only not working in IE 11.  It works in Chrome.
0
Ianko
Telerik team
answered on 26 Aug 2015, 08:51 AM
Hi Edward,

If the server call is done via AJAX techniques, such issue might appear due to the submit mechanism of the browser. You can troubleshoot that by following this help article— http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/troubleshooting/editor-content-is-not-saved-after-ajax-update.

Regards,
Ianko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Editor
Asked by
Edward
Top achievements
Rank 1
Answers by
Edward
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or