Sharepoint 2010 Sharepoint 2013主机url令牌未返回主机url值
我有一个正在成功部署到SharePoint 2013的应用程序。ECB菜单项的代码为:Sharepoint 2010 Sharepoint 2013主机url令牌未返回主机url值,sharepoint-2010,sharepoint-2013,Sharepoint 2010,Sharepoint 2013,我有一个正在成功部署到SharePoint 2013的应用程序。ECB菜单项的代码为: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Control ControlAssembly="Sharepoint.Webpart, Version=1.0.0.0, Culture=neutral, PublicKeyT
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control
ControlAssembly="Sharepoint.Webpart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=04e797fdfc603650"
ControlClass="Sharepoint.Webpart.CustomItemAction" Sequence="50" Id="AdditionalPageHead"/>
<CustomAction Id="CustomAction.Ecb.Add"
Location="EditControlBlock"
RegistrationType="ContentType"
RegistrationId="0x0101"
Sequence="302"
Title="Add"
Description="Add"
ImageUrl ="http://localhost:20102/Content/Images/SharePoint/CustomAction.Add.16x16.png">
<UrlAction Url="http://localhost:20102/Add/?HostUrl={HostUrl}&Source={Source}&ListId={ListId}&ItemId={ItemId}"/>
</CustomAction>
</Elements>
我不确定为什么没有返回HostUrl 事实证明,我在设置项目时犯了一个错误。我错误地制作了SharePoint 2010应用程序而不是SharePoint 2013应用程序。所以当我调用某些属性时,我得到了错误。这只是因为这些属性在SharePoint 2010中不存在
http://localhost:20102/Add/?HostUrl={HostUrl}&Source=http%3A%2F%2Fc4968397007%2FSitePages%2FHome%2Easpx&ListId=%7B3E3145D1%2D95DB%2D4581%2D840E%2D0F23F9573D1E%7D&ItemId=3