Principales respuestas
Webpart en Application page

Pregunta
-
Qué tal compañeros, espero me puedan colaborar con este inconveniente,
Sucede qué necesito agregar un WebPart en mi página de aplicación y después de haber investigado un poco en la red me dí cuenta qué esto es posible, pero por ahora tengo un error cuando intento referenciar el Register de mi WebPart en la parte superior del código pues cuando despliego me dice qué The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft'
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
Este es mi código.
Gracias!
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExamplePage.aspx.cs" Inherits="Quala.IndexCard.Layouts.Quala.IndexCard.ExamplePage" DynamicMasterPageFile="~masterurl/default.master" %> <asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> </asp:Content> <asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server"> Fine! <WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{DE44B1C2-41CD-4616-B48F-2174A6F55404}" > <WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2"> <Title>Public</Title> <FrameType>Default</FrameType> <Description /> <IsIncluded>true</IsIncluded> <PartOrder>2</PartOrder> <FrameState>Normal</FrameState> <Height /> <Width /> <AllowRemove>true</AllowRemove> <AllowZoneChange>true</AllowZoneChange> <AllowMinimize>true</AllowMinimize> <AllowConnect>true</AllowConnect> <AllowEdit>true</AllowEdit> <AllowHide>true</AllowHide> <IsVisible>true</IsVisible> <DetailLink /> <HelpLink /> <HelpMode>Modeless</HelpMode> <Dir>Default</Dir> <PartImageSmall /> <MissingAssembly>Cannot import this Web Part.</MissingAssembly> <PartImageLarge /> <IsIncludedFilter /> <ExportControlledProperties>true</ExportControlledProperties> <ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID> <ID>g_de44b1c2_41cd_4616_b48f_2174a6f55404</ID> <ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">{17FE4851-84C5-47C2-BB6B-C7C7171AC1FE}</ListName> <ListId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">17fe4851-84c5-47c2-bb6b-c7c7171ac1fe</ListId> <PageType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">PAGE_DISPLAYFORM</PageType> <FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">4</FormType> <ControlMode xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">Display</ControlMode> <ViewFlag xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">1048576</ViewFlag> <ViewFlags xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">Default</ViewFlags> <ListItemId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">0</ListItemId> </WebPart> </WebPartPages:ListFormWebPart> </asp:Content> <asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server"> Application Page </asp:Content> <asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" > My Application Page </asp:Content>
- Editado AndrésDGómez martes, 19 de noviembre de 2013 22:14
Respuestas
-
Hola AndrésDGómez. ¿Has comprobado que la DLL Microsoft.SharePoint.dll se encuentra en el proyecto?
- Propuesto como respuesta Santiago Porras RodríguezMVP, Moderator sábado, 18 de enero de 2014 1:00
- Marcado como respuesta Santiago Porras RodríguezMVP, Moderator sábado, 18 de enero de 2014 1:00