Update radeditor to database failed

2 posts, 0 answers
  1. kibitz
    kibitz avatar
    6 posts
    Member since:
    Dec 2010

    Posted 04 Feb 2011 Link to this post

    telerik team please help me asap, im im trying to update the content in rad editor but nothing change when i actually update it in my button here is my code in update
    cmd = new sqlcommand("UPDATE id,template FROM TEMPLATES WHERE id=1")

          SaveInCurrentFile(radEditorTemplate)
            cmd = New SqlCommand("UPDATE tblTemplate SET template=@temp where id=@id", con)
            cmd.Parameters.AddWithValue("@id", "1")
            cmd.Parameters.AddWithValue("@temp", html)
            cmd.ExecuteNonQuery()
    so i actually guessing whats my wrong?
    i also tried java script

      <script type="text/javascript">  
             
            function OnCLientClick(editor, args)     
            {                       
               editor.attachEventHandler("onkeydown", function(e)     
               {     
               setTimeout(function(){  
                   alert("Content changed! Current content: " + $find("<%=radEditorTemplate.clientID %>").get_text()); }, 0);    
              
               });     
            }     
        </script>


    please telerik team help me asap i need it badly in my project thank you in regards

  2. Rumen
    Admin
    Rumen avatar
    12848 posts

    Posted 08 Feb 2011 Link to this post

    Hello Kibitz,

    You can find a fully working Save In Database example with code here. You can also check the following demo: Datagrid Edit Template.

    Best regards,
    Rumen
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top