I added DNNTextEditor inside Update Panel Control and I would like to update its content by using DropDownList .. but The Issue appears when I added it ..It is Causing Postback .. Any Ideas about how to avoid such issue ?
Code Example :
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="View.ascx.cs" Inherits="MyNamespace.View" %>
<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="myddl" runat="server" OnSelectedIndexChanged="myddl_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="Text1" Value="Value1"></asp:ListItem>
<asp:ListItem Text="Text2" Value="Value2"></asp:ListItem>
</asp:DropDownList>
<dnn:TextEditor ID="MyTextEditor" runat="server" HtmlEncode="true" />
</ContentTemplate>
<%-- <Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlTemplates" EventName="SelectedIndexChanged" />
</Triggers>--%>
</asp:UpdatePanel>
protected void myddl_SelectedIndexChanged(object sender, EventArgs e)
{
MyTextEditor.Text = myddl.SelectedItem.Text;
}