1

How can I create a new ECB custom action by Visual Studio. Which kind of project do I need to create?

1 Answer 1

1

Create a SharePoint Empty Project. Then Add Empty Element. Update the contents of the xml file. An example:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction RegistrationType="ContentType" RegistrationId="0x01200032C6A02524ED43F5AD242743898508D800EAD428598B934BA88023591EFDAFF1A2006226422850DB44FE8E4D61D2F82B1193" Location="EditControlBlock" Sequence="106" Title="Manage Client Logo File" ImageUrl="/_layouts/images/view.gif" Rights="EditListItems,AddListItems,DeleteListItems">
    <UrlAction Url="~site/_layouts/ClientLogoManagement.aspx?ItemUrl={ItemUrl}&amp;ListId={ListId}"/>
  </CustomAction>
</Elements>
2
  • Thanks! How can I pass the value field of the item in the UrlAction? (ex the Title)
    – Nk SP
    Nov 24, 2014 at 9:12
  • 1
    Pass ItemId={ItemId}. It will give the item ID. Then use it to get the item and from that the Title field. Nov 24, 2014 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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