I have created a custom site page in sharepoint 2010 and added the following code to it

<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="Main" Title="loc:Main" >
   <WpNs0:DashBoard runat="server" ID="g_55249317_828e_4af6_a7bc_94bff9a8468b"    
                 Description="TicketTale DashBoard WebPart"
                 Title="TicketTale DashBoard WebPart"             
                 WebPart="true" __designer:IsClosed="false" partorder="2">

and i have created a custom webpart which is included in the webpartzone above the webpart is working fine but the problem is the webpart became static meaning that i can't modify or delete it, although when i add it manually to the same page or any other page ,i can modify or delete it normally,

help please!!!

1 Answer 1


When you add a webpart like this it is by design you cannot edit it, you are turning it from a webpart into a control.

If you want to add it programatically the only way is through powershell/event handler or form/console application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.