Foros
Nuevos mensajes
Buscar en foros
Acceder
Regístrate
Novedades
Buscar
Buscar
Buscar solo en títulos
De:
Menú
Acceder
Regístrate
Install the app
Instalar
Foros
Software de Gestión
Microsoft Sharepoint
Crear páginas Wiki Sharepoint
JavaScript está desactivado. Para una mejor experiencia, por favor, activa JavaScript en el navegador antes de continuar.
Estás utilizando un navegador obsoleto. Este u otros sitios web pueden no ser mostrados correctamente.
Debes actualizarlo o utilizar un
navegador alternativo
.
Responder al tema
Mensaje
<blockquote data-quote="CrepuX" data-source="post: 10469" data-attributes="member: 12712"><p>Muy buenas a todos/as,</p><p></p><p>Soy nuevo en la programación con Sharepoint y tengo un problemilla a ver si me podeis echar un cable: Necesito crear una plantilla para emular una Wikipedia en Sharepoint. He encontrado un ejemplo por Internet, pero al meterlo en el Visual Studio, me casca en la herencia de la clase. Tengo metidas las referencias: Microsoft.Sharepoint, System, System.Data, System.Web y System.xml. </p><p></p><p>Me dice: Error 1 The type or namespace name 'CreateWebPage' could not be found (are you missing a using directive or an assembly reference?) </p><p>El código es el siguiente: </p><p></p><p>using System;</p><p>using System.Collections.Generic;</p><p>using System.Text;</p><p>using System.Web.UI;</p><p>using Microsoft.SharePoint.ApplicationPages;</p><p>using Microsoft.SharePoint.WebControls;</p><p>using Microsoft.SharePoint;</p><p></p><p></p><p>namespace Wiki</p><p>{</p><p> public class EnhancedCreateWebpage : CreateWebPage</p><p> {</p><p> protected ListFieldIterator listFieldIterator;</p><p> protected string template;</p><p></p><p> public EnhancedCreateWebpage() { }</p><p></p><p> protected override void OnPreRender(EventArgs e)</p><p> {</p><p> if (!this.Page.IsPostBack)</p><p> {</p><p> // Get the templates list</p><p> SPList templatesList = this.listFieldIterator.Web.Lists["Page Templates"];</p><p> if (TemplateSourceDirectory != null && templatesList.Items.Count > 0)</p><p> {</p><p> // Just take the first template for demonstration</p><p> this.template = templatesList.Items[0]["Template"].ToString();</p><p> }</p><p> templatesList = null;</p><p></p><p> this.FindRichTextControl(listFieldIterator);</p><p> }</p><p> base.OnPreRender(e);</p><p> }</p><p></p><p> private void FindRichTextControl(Control control)</p><p> {</p><p> foreach (Control childControl in control.Controls)</p><p> {</p><p> if (childControl.GetType().Equals(typeof(Microsoft.SharePoint.WebControls.RichTextField)))</p><p> {</p><p> ((RichTextField)childControl).Value = this.template;</p><p> return;</p><p> }</p><p> this.FindRichTextControl(childControl);</p><p> }</p><p> }</p><p></p><p> }</p><p></p><p></p><p>}</p><p></p><p>Alguna idea de por donde pueden ir los tiros??</p><p></p><p>Un saludo a todos/as y muchas gracias</p></blockquote><p></p>
[QUOTE="CrepuX, post: 10469, member: 12712"] Muy buenas a todos/as, Soy nuevo en la programación con Sharepoint y tengo un problemilla a ver si me podeis echar un cable: Necesito crear una plantilla para emular una Wikipedia en Sharepoint. He encontrado un ejemplo por Internet, pero al meterlo en el Visual Studio, me casca en la herencia de la clase. Tengo metidas las referencias: Microsoft.Sharepoint, System, System.Data, System.Web y System.xml. Me dice: Error 1 The type or namespace name 'CreateWebPage' could not be found (are you missing a using directive or an assembly reference?) El código es el siguiente: using System; using System.Collections.Generic; using System.Text; using System.Web.UI; using Microsoft.SharePoint.ApplicationPages; using Microsoft.SharePoint.WebControls; using Microsoft.SharePoint; namespace Wiki { public class EnhancedCreateWebpage : CreateWebPage { protected ListFieldIterator listFieldIterator; protected string template; public EnhancedCreateWebpage() { } protected override void OnPreRender(EventArgs e) { if (!this.Page.IsPostBack) { // Get the templates list SPList templatesList = this.listFieldIterator.Web.Lists["Page Templates"]; if (TemplateSourceDirectory != null && templatesList.Items.Count > 0) { // Just take the first template for demonstration this.template = templatesList.Items[0]["Template"].ToString(); } templatesList = null; this.FindRichTextControl(listFieldIterator); } base.OnPreRender(e); } private void FindRichTextControl(Control control) { foreach (Control childControl in control.Controls) { if (childControl.GetType().Equals(typeof(Microsoft.SharePoint.WebControls.RichTextField))) { ((RichTextField)childControl).Value = this.template; return; } this.FindRichTextControl(childControl); } } } } Alguna idea de por donde pueden ir los tiros?? Un saludo a todos/as y muchas gracias [/QUOTE]
Nombre
Verificación
¿Cual es la Capital de España?
Responder
Foros
Software de Gestión
Microsoft Sharepoint
Crear páginas Wiki Sharepoint
Arriba