How to set editor html from server side?

Last post 02-15-2005, 10:49 PM by srfortner. 2 replies.
Sort Posts: Previous Next
  •  02-15-2005, 9:17 AM 4113

    How to set editor html from server side?

    I have html code stored in a database.  On the page load, I am pulling html from the database and need to stuff it into the editor control as html, not as text.  The only server side attribute I can find is .text, which does not stuff it in as html, but as plain text.  How do I stuff the string in as html?
  •  02-15-2005, 9:33 AM 4114 in reply to 4113

    Re: How to set editor html from server side?

    Text property allows you stuff your html code into the Cute Editor as HTML markup instead of the plain text.


     
    In the above example, when the page loads, we send the following html code into the editor:
     
     Editor1.Text = @"<table cellspacing=""4"" cellpadding=""4"" bgcolor=""#ffffff"" border=""0""> <tbody> <tr> <td> <p> <img src=""http://cutesoft.net/Uploads/j0262681.jpg"" width=""80"" /></p></td> <td> <p>When your algorithmic and programming skills have reached a level which you cannot improve any further, refining your team strategy will give you that extra edge you need to reach the top. We practiced programming contests with different team members and strategies for many years, and saw a lot of other teams do so too.  </p></td></tr> <tr> <td> <p> <img src=""http://cutesoft.net/Uploads/PH02366J.jpg"" width=""80"" /></p></td> <td> <p>From this we developed a theory about how an optimal team should behave during a contest. However, a refined strategy is not a must: The World Champions of 1995, Freiburg University, were a rookie team, and the winners of the 1994 Northwestern European Contest, Warsaw University, met only two weeks before that contest.  </p></td></tr></tbody></table> <br /> <br />"; 

    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

  •  02-15-2005, 10:49 PM 4122 in reply to 4113

    Re: How to set editor html from server side?

    Thanks, found out it was because I was using server.htmlencode to save the data.
View as RSS news feed in XML