HTML not writing to Database

3 posts, 0 answers
  1. WebGeek
    WebGeek avatar
    39 posts
    Member since:
    Dec 2006

    Posted 08 Jan 2009 Link to this post

    When I submit the content in my editor to the database (html) and click save, it writes the text to the database but not the HTML.  Any suggestions? 
  2. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 08 Jan 2009 Link to this post

    Hi,

    How are you saving the content to the database?  I do the same with one of our internal applications and it saves the markup just fine.

    Would you be able to post your editor code and how you're saving it to the database so we can help you to debug the problem?

    -Serrin
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. WebGeek
    WebGeek avatar
    39 posts
    Member since:
    Dec 2006

    Posted 13 Jan 2009 Link to this post

    That was my problem.  I was setting .Text rather than .Content.

    My corrected code is below:
     get 
                {  
                    return this.txtSpecializedTraining.Content;  
                }  
                set 
                {  
                    this.txtSpecializedTraining.Content = value;  
                } 

    Rather than:
     get 
                {  
                    return this.txtSpecializedTraining.Text;  
                }  
                set 
                {  
                    this.txtSpecializedTraining.Content = value;  
                } 
Back to Top