Paul, Looks like this ASCX is actually the control for the field editor. Two things - the ASCX needs to be in a folder in the CONTROLTEMPLATES directory, and the usercontrol code-behind must implement the IFieldEditor interface. Declare your class in the code-behind like this:
public partial class MyFieldEditor : UserControl, IFieldEditor Cheers, J. ________________________________ James Boman ■ Telephone: +61 (08) 7200 1100 ■ Mobile: +61 (0) 417 857 298 ■ Web: http://www.ipmo.com.au || http://www.projectserver.com.au From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Tuesday, 27 March 2012 8:48 AM To: 'ozMOSS' Subject: RE: Parser error with custom field control OK. So I commented out the code behind reference and now get this. Does that offer a clue?? Unable to cast object of type 'ASP._controltemplates_ceo_cascadinglookup_clueditcontrolwithfilter_ascx' to type 'Microsoft.SharePoint.WebControls.IFieldEditor'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Unable to cast object of type 'ASP._controltemplates_ceo_cascadinglookup_clueditcontrolwithfilter_ascx' to type 'Microsoft.SharePoint.WebControls.IFieldEditor'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidCastException: Unable to cast object of type 'ASP._controltemplates_ceo_cascadinglookup_clueditcontrolwithfilter_ascx' to type 'Microsoft.SharePoint.WebControls.IFieldEditor'.] Microsoft.SharePoint.ApplicationPages.FieldCustomizationPage.CreateChildControls() +1189 Microsoft.SharePoint.ApplicationPages.FieldNewPage.CreateChildControls() +27 System.Web.UI.Control.EnsureChildControls() +146 Microsoft.SharePoint.ApplicationPages.FieldCustomizationPage.OnLoad(EventArgs e) +83 Microsoft.SharePoint.ApplicationPages.FieldNewPage.OnLoad(EventArgs e) +18 System.Web.UI.Control.LoadRecursive() +66 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428 From: ozmoss-boun...@ozmoss.com<mailto:ozmoss-boun...@ozmoss.com> [mailto:ozmoss-boun...@ozmoss.com]<mailto:[mailto:ozmoss-boun...@ozmoss.com]> On Behalf Of Paul Noone Sent: Tuesday, 27 March 2012 8:54 AM To: 'ozMOSS' Subject: RE: Parser error with custom field control I could but then nothing would render at all I don't. It seems that the problem is with parsing the field, so maybe the XML schema has changed? The control definitely inherits from System.Web.UI.UserControl! From: ozmoss-boun...@ozmoss.com<mailto:ozmoss-boun...@ozmoss.com> [mailto:ozmoss-boun...@ozmoss.com]<mailto:[mailto:ozmoss-boun...@ozmoss.com]> On Behalf Of Paul Turner Sent: Tuesday, 27 March 2012 8:44 AM To: ozMOSS Subject: RE: Parser error with custom field control Have you tried to take the "CodeBehind" out. Regards Paul Turner ________________________________ NOTICE - This communication is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking any action in reliance on, this communication by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient of this communication please delete and destroy all copies and telephone SMS Management & Technology on 1300 842 767 immediately. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of SMS Management & Technology. Except as required by law, SMS Management & Technology does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free from errors, virus, interception or interference.
_______________________________________________ ozmoss mailing list ozmoss@ozmoss.com http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss