Saving HTML to Database

Last post 10-17-2006, 8:24 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  10-17-2006, 2:50 PM 23648

    Saving HTML to Database

    The SavedHTML field in my SQL Server DB is seen like this via Management Studio:  (ver 1)
     
    <p>
    <table style="WIDTH: 100%; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="10" border="0">
        <tbody>
            <tr>
                <td style="FONT-SIZE: 11px; FONT-FAMILY: Sans-Serif">
                <p><strong style="COLOR: #ff9900"><br />Specialists</strong> <strong style="COLOR: #ffcc99">in custom productivity solutions.  This means we will take your business requirements and develop a software application that combines ease of use and robust functionality.  We do this by employing the latest Microsoft technologies and tools to deliver a comprehensive utilization of our knowledge and your existing investment in IT.  We can show you applications that run over the internet, but have the look and feel of a desktop application.</strong></p>
                </td>
            </tr>
        </tbody>
    </table>
    </p>

    When I retrieve the SavedHTML shown above and place it in CuteEditor like so: 

        var editor1 = document.getElementById('<%=Editor1.ClientID%>');
        editor1.SetActiveTab('code');
        editor1.setHTML(vSavedHTML);
     
    It appears in CuteEditor as desired like so: (Ver 2)
     
    <p>
    <table style="WIDTH: 100%; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=10 border=0>
        <tbody>
            <tr>
                <td style="FONT-SIZE: 11px; FONT-FAMILY: Sans-Serif">
                <p><strong style="COLOR: #ff9900"><br>Specialists</strong> <strong style="COLOR: #ffcc99">in custom productivity solutions.&nbsp; This means we will take your business requirements and develop a software application that&nbsp;combines ease of use and robust functionality.&nbsp; We do this by employing the latest Microsoft technologies and tools to deliver a comprehensive utilization of our knowledge and your existing investment in IT.&nbsp;&nbsp;We can show you applications that run over the internet, but have the look and feel&nbsp;of a desktop application.</strong></p>
                </td>
            </tr>
        </tbody>
    </table>
    </p>

    But how do I return changed HTML in CuteEditor window to the database in the text format it was originally (ver 1)?
     
    When I return bodyText (bodyText = editor1.getHTML();) to the DB via a storedProc it is formated as HTML (ver 2) which is undesireable when I wish to dislay my grid.
  •  10-17-2006, 8:24 PM 23653 in reply to 23648

    Re: Saving HTML to Database

    For some reasons, your HTML code is encoded.
     
    Please create a simple example and post the code here.
     
     
     

    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