Hello
I'm trying to customize the RichImageField with this code
namespace Test.SharePoint.WebControls
{
public class MyCustomCalendar : RichImageField
{
protected override void RenderFieldForDisplay(HtmlTextWriter output)
{
// create a new tempWriter to consume the output from the base class
TextWriter tempWriter = new StringWriter();
base.RenderFieldForDisplay(new HtmlTextWriter(tempWriter));
// capture the output of the base class and do the required adjustments
string newHtml = tempWriter.ToString().Replace("</span> ", "</span>");
// write out the corrected html
output.Write(newHtml);
}
}
}
And when i insert the assembly into my page layout i only throws
"An unexpected error has occurred. "
I know my I have written the right thing in the page layout because if I exchange the code in the class library to inherit a image for example.
What can be wrong?
Please help!