<telerik:RadEditor ID="txtWarning" runat="server" EditModes="Design" ToolbarMode="Default" Width="400px" Height="100px" MaxTextLength="1000" ContentAreaMode="Div" ContentFilters="None" ></telerik:RadEditor>
string text = txtWarning.Content
4 Answers, 1 is accepted
Have you tried the proposed solutions at RadEditor Content Not Saved After Ajax Update in Firefox, Google Chrome and Safari?
The issue could be also related to overriding the editor content in your Page_Load method. Please note that if you read the content of the editor in an event handler (such as a button event handler) this event handler executes later in the page lifecycle compared to Page_Load. This is why, in case you set the initial content in Page_Load it is mandatory to add a !Page.IsPostBack check, e.g.
if (!Page.IsPostBack)
{
RadEditor1.Content = "Some content";
}
Regards,
Rumen
Progress Telerik
hi Rumen,
thank you for your reply, you made my day.
but RadEditor not losing data if i use UseSubmitBehavior="false" for button, if not RadEditor losing data in save_click event.
and if i keep UseSubmitBehavior="false", then am unable to use onClientClick event for button.
<asp:Button CssClass="button" ID="btnSave" runat="server" UseSubmitBehavior="false" Text="Save" OnClick="btnSave_Click" meta:resourcekey="btnSaveResource1" />
Please given me a solution to use onClientClick and onClick for the button. i need client event and server event for button. because iam doing validations in onClientclick.
<asp:Button CssClass="button" ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" meta:resourcekey="btnSaveResource1" onClientClick = "ComparePassword()" />
The following StackOverflow marked as answer post discusses the issue you are facing:
This article kind of explains the problem. You need to return true in your JS if you want the server event to trigger. Otherwise, you have to return false.
And, it also looks like you will have to add the UseSubmitBehavior = false based on: OnclientClick and OnClick is not working at the same time?
This is especially evident after seeing that your generated HTML only has the CloseDialog() and not the call to Button1_Click. This change will concatenate to the end of your onclick.
<asp:Button ID="Button1" runat="server" Text="Soumettre ce ticket" onclick="Button1_Click" OnClientClick="CloseDialog();" UseSubmitBehavior="false"/>
Regards,
Rumen
Progress Telerik