New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

How Can I avoid Postback caused by DNN Text Editor ??

Return to previous page

  • 2/25/2015
  • 2169 Views

Question:

Ahmed Hussein long time ago

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;
}

How Can I avoid Postback caused by DNN Text Editor ??

Ahmed Hussein
Ahmed Hussein long time ago
Add an Answer

Answers

Sign In to Participate
Or register to become a member