Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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" >
 <ZoneTemplate>                       
   <WpNs0:DashBoard runat="server" ID="g_55249317_828e_4af6_a7bc_94bff9a8468b"    
                 Description="TicketTale DashBoard WebPart"
                 Title="TicketTale DashBoard WebPart"             
                 __MarkupType="vsattributemarkup" 
                 __WebPartId="{55249317-828E-4AF6-A7BC-94BFF9A8468B}"
                 WebPart="true" __designer:IsClosed="false" partorder="2">
   </WpNs0:DashBoard>
 </ZoneTemplate>
</WebPartPages:WebPartZone>

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!!!

share|improve this question

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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