taidokas

I have this code:

Code Snippet

namespace Test.SharePoint.WebControls
{
public class MyCustomCalendar : RichImageField
{

protected override void Render(HtmlTextWriter output)
{
base.Render(output);
}
}

}

If i override some other metod like RenderForDisplay it works, but then I cant do what I want with the code.

When I run the custom RichImageField in SP Design it says "Request failed" on my custom part. And if I try to run the page it failes on unexcpeted error.

Does any one have any clue

I have tried adding this

Code Snippet
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)]

but it dosent work