error: Failed to render "Descript" column because of an error in the "
I develop a richtext custom field type ascx control.
When I am setting a value in sharepoint page to my custom field, i inspect the value of arichNumber.GetDesignTimeHtml()and it gives me this errored value:
"<span dir=\"none\">\r\n\t\t<span dir=\"ltr\">\r\n\t\t\t<span class=\"ms-formvalidation\">Failed to render "Descript" column because of an error in the "Phone Number" field type control. See details in log. Exception message: Control 'ctl00_m_g_663a2e24_fbea_471e_b0c1_a2eb2566a10b_ctl00_ctl04_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_richNumber_ctl00_TextField' of type 'TextBox' must be placed inside a form tag with runat=server.. </span>" string....
Just to let you know
the custom field ascx control is defined like this:
<%@ Control Language="C#" Debug="true" %>
<%@Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@Register TagPrefix="SharePoint" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" namespace="Microsoft.SharePoint.WebControls"%>
<SharePoint:RenderingTemplate ID="TelephoneFieldControl" runat="server">
<Template>
<SharePoint:RichTextField ID="richNumber" runat="server" ></SharePoint:RichTextField>
</Template>
</SharePoint:RenderingTemplate>
and the cs class for the control has this overriden method (the get method is what executes when i set a value for my custom richtext custom field control)
public override object Value
{
get
{
if (Field == null) return;
if (ControlMode == Microsoft.SharePoint.WebControls.SPControlMode.Display)
return;
richNumber = (Microsoft.SharePoint.WebControls.RichTextField)TemplateContainer.FindControl("richNumber");
if (richNumber == null)
throw new ArgumentException("RichNumber is null. Corrupted ascx file.");
richNumber.TabIndex = TabIndex;
richNumber.CssClass = CssClass;
return richNumber.GetDesignTimeHtml();
//Text.Trim();
}
set ........etc
{
}
}
Thank thee :)

