Nov 4, 2010 at 9:54 AM


I've been using your new version (thanks!) but I've a little problem...

I've a listbox which do autopostback, and then fills Typps HTML Editor with database content. The first item I select works fine, but when I select another one the same content still appear at HTML Editor instead the new database obtained data.

I assume it's because HTMLEditor is sending its content together with listbox autoPostBack and then ignores the upcoming database content.

Sample code:

string strConn = WebConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString;
SqlConnection Conn = new SqlConnection(strConn);
sqlUserName  = "SELECT DISTINCT * from view_TramiteINFO where ID_TramPaso = " + IDPaso;
SqlCommand com = new SqlCommand(sqlUserName, Conn);
dr = com.ExecuteReader();
MyTyppsEditor.Text = Convert.ToString(dr["PasoText"]); 

The red line shows where the content should be replaced with database content, but it's not working after the first postback (it works with default VS2010 basic HTMLEditor).

Thanks for any help


Nov 4, 2010 at 2:09 PM

Hello, I couldn't reproduce the problem. Following is a simple self contained sample based on your description. As you can note, there's a dropdownlist with autopostback and each time the new value is reflected in the editor. Let me know if I have missed something :

<%@ Page Language="C#" ValidateRequest="false" %>
<%@ Register Assembly="Typps" Namespace="Typps" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)

    void UpdateEditor()
        string selectedText = DropDownList1.SelectedItem.Text;
        Editor1.Text = selectedText;

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" 
            <asp:ListItem Text="a"></asp:ListItem>
            <asp:ListItem Text="b"></asp:ListItem>
            <asp:ListItem Text="c"></asp:ListItem>
        <cc1:Editor ID="Editor1" runat="server">