Rich Text Editor Control
Posted on 2005-04-11
I have developed an ASP.NET Rich Text Editor control, which works nicely (minus one key feature). The issue is I am having trouble with, is getting the data from the RTE to the code behind page where it can be used, written to a file, etc.
Basically, I want to be able to use the RTE like I would an asp:textbox, as in placing the control on a page, and having access to it, programatically through code behind pages.
I see only one way to do this, is to have a hidden input field embedded with the control. Once the form is submitted, the value of the RTE will be written to the hidden field, which I can then access via a Request or HtmlControl.
The tricky part is that this has to be done before the form posts back, via a javacript. I can do this manually by adding an "onsubmit" event to the form of the page, but I want this control to be self sufficient.
How can I programatically, attach an "onsubmit" call to a form of an aspx page?