Save button in the cuteeditor toolbar, and page validation.

Last post 06-26-2006, 8:35 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  06-26-2006, 8:21 AM 20471

    Save button in the cuteeditor toolbar, and page validation.

    We are using the cuteeditor save button in the cuteeditor toolbar as the save for the entire page. (I have a few textboxes on the page and the cuteeditor interface)

    Is there a way to cause page validation to occur when hitting the save button? So that the textboxes outside the editor also are validated.

    At present I'm having to add a Page.Validate() into the Editor1_PostBackCommand command for every page template that we have coded.

    It's a little time consuming so I was hoping to be able to add the page.Validate to every press of the save button at the cuteeditor interface level.

    Cheers Mike

  •  06-26-2006, 8:35 PM 20498 in reply to 20471

    Re: Save button in the cuteeditor toolbar, and page validation.

    Mike,
     
    Try the following example:
     
    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
     <body>
            <form runat="server" ID="Form1">                       
            <CE:Editor id="Editor1" OnTextChanged="Submit" runat="server" ></CE:Editor>
            <asp:Literal ID="Literal1" Runat="server" />
      </form>
     </body>
    </html>
    <script runat="server">
     public void Submit(object sender, System.EventArgs e)
     {
         // do page validation here.....
     
         Literal1.Text = "<h2>The HTML you typed is...</h2><br>"; 
         Literal1.Text += Server.HtmlEncode(Editor1.Text);
     }
    </script>
     
    Hope it helps. Let me know if you have any further questions.
     
     

     
     

    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

View as RSS news feed in XML