I am using the ascx control - not instantiating. To summarise the ascx, it has the following header to register the control...(nb: dropped the angled brackets so it displays ok)
"Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"
Table 1 with a texteditor as follows
"dnn:texteditor id="teRaiseNote" runat="server" width="100%" height="350px" cssclass="NPCommonEditFull"/"
Table 2 with a texteditor as follows
"dnn:texteditor id="tePublicNotes" runat="server" width="100%" height="350px" cssclass="NPCommonEditFull"/"
In the code PageLoad routine the code basically goes like
If Not Page.IsPostBack Then
TableA.Visible = True
TableB.Visible = False
teRaiseNote.ChooseRender = False
teRaiseNote.ChooseMode = False
tePublicNotes.ChooseRender = False
tePublicNotes.ChooseMode = False
PutDataInFields()
End If
In the code PutDataInFields() routine the code basically goes like
teRaiseNote.Text = infChangeNote.ScnRaisedNote
tePublicNotes.Text = infChangeNote.ScnRaisedNote
So far so good ... but if I try to collect the tePublicNotes.Text at this point then it causes the exception - seemingly only on the tePublicNotes that would be on the TableB which is hidden but I accept you may not be able to collect this before the text editor cycles.
When running TableA is shown and the text (teRaiseNote) is fine. A button selects to show TableB via a postback which basically simply does
TableB.Visible = True
TableA.Visible = False
But then there is no text in the editor in TableB (tePublicNotes).
So if you can put more than one on a page ok it is either 1) visibility setting? 2) the postback?
Note: You can correctly edit and save the text from all the text editors on the page - it is only when you return and try to load what you saved into the editor that this problem occurs ... and you can still edit correctly the blank editor - you've just lost the previous entry.
I am going to have more of a play with different things - but I am at the end of my project life cycle and this has just cropped up and and trying to establish whether it's a problem I can resolve myself ... under some pressure.
Thanks
Scott