The concept of findcontrol seems to elude me somewhat and I would like some advice if anyone can spare it.
My SP page layout contains a richhtmlfield with a highly descriptive ID of "RichHtmlField1". The same page layout contains a custom user control that needs to read te contents of this richhtmlfield and e-mail it.
To get the content I figured I'd use the findcontrol function. And this works fine. I then cast the control to a richhtmlfield and try to access the .Html property. But apparently that's empty. I don't understand that, since if you look at the page the content
of the field is clearly filled.
Can anybody shed some light on the subject?
My (highly professional) code:
HtmlGenericControl myDiv = new HtmlGenericControl("div");
Control cntlTest = this.Parent.FindControl("RichHtmlField1");
//This works and gives me the proper results
myDiv.InnerHtml += cntlTest.ID + " || " + cntlTest.GetType();
//This is empty
View Complete Post