Evenhandler not called

Last post 01-11-2006, 4:41 AM by stephenwm. 3 replies.
Sort Posts: Previous Next
  •  01-10-2006, 1:23 PM 14575

    Evenhandler not called

     I have page which uses a master page and skin file. In in the C# code behind it, there is an event handler inside which it reads the content of the editor for saving to a database. The problem I'm having is that the first time the Update button is clicked, there event handler is not called and the content of the editor is lost. If the Update Button is called a second time, only then is the evenhandler called. I'm just wonder if there is some aspect of the Cute Editor which may be causing this as this does not happen with other pages in the project.
     
     public void btnUpdate_Click(object sender, System.EventArgs e)
     {
         string myContent = htmlEditor.Text;
     }
  •  01-10-2006, 3:47 PM 14590 in reply to 14575

    Re: Evenhandler not called

    I have no clue now.

    It would be really helpful if you could send us a sample aspx page which demonstrates the exact problem with more information.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  01-11-2006, 4:40 AM 14600 in reply to 14590

    Re: Evenhandler not called

    Here is the ascx file used as the skin file which the cute editor is placed in:

    <%@ control language="C#" %>
    <%@ register tagprefix="CE" namespace="CuteEditor" assembly="CuteEditor" %>
    <%@ register tagprefix="sc" namespace="MyProject.Controls" assembly="MyProject.Controls" %>
    <table width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td class="fh" valign="top" width="*">
                <table id="newsletterT" runat="server">
                    <tr>
                        <td colspan="3" height="10">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3" height="10">
                            <ce:editor enablestripscripttags="false" autoconfigure="Full" removeservernamesfromurl="false"
                                id="htmlEditor" runat="server" enableviewstate="False">
                                                        <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
                                                            CssClass="CuteEditorFrame" Height="100%" Width="100%" />
                                                        </ce:editor>
                            <br />
                            <asp:literal id="Literal1" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </td> </tr>
    <tr>
        <td height="16" class="fh">
        </td>
    </tr>
    <tr>
        <td align="center">
            <asp:button id="btnUpdate" runat="server" text="Submit" causesvalidation="true"></asp:button>
        </td>
    </tr>
    <tr>
        <td height="16">
        </td>
    </tr>
    </table>
  •  01-11-2006, 4:41 AM 14601 in reply to 14590

    Re: Evenhandler not called

    Here's the master page as well:

    <%@ Page Language="C#" MasterPageFile="~/MasterPages/Newsletter.master" Trace="false"   Culture="en-GB" UICulture="en-GB" %>

    <%@ Register TagPrefix="projectControls" Namespace="MyProject.Controls" Assembly="MyProject.Controls" %>
    <%@ Import Namespace="MyProject.Controls" %>

    <asp:content id="content2" contentplaceholderid="_mainContent" runat="server">
        <table width="100%">
            <tr>
                <td>
                    <projectControls:ManageContent ID=ManageContent Runat=server />               
                </td>
            </tr>
        </table>
    </asp:content>




View as RSS news feed in XML