On The Rocks

July 10, 2007

Utilizar Codigo Server Side no SharePoint

Filed under: Uncategorized

Ando a desvendar as maravilhas do Microsoft Office SharePoint 2007. Comecei por criar trabalhar na pagina inicial default.aspx e quando ia a colocar codigo de servidor:

href=’< %# Eval("ValuePath") %>‘>< %# Eval("Text") %>

deparei-me com um problema, começou a dar o seguinte erro "An error occurred during the processing of default.aspx. Code blocks are not allowed in this file. " . Não consigo correr código do lado do servido em paginas .ASPX, estranho ? Nem por isso, o SharePoint desliga a possibilidade de criar codigo de servidor por defeito, para solucionar isso, basta ligar esta opção. No ficheiro web.config na secção configuration/SharePoint/PageParserPaths incluimos a nossa pagina.

<PageParserPaths>
      <PageParserPath VirtualPath="/pages/test.aspx" CompilationMode="Always" AllowServerSideScript="true" />
</PageParserPaths>

e deixamos de ter problemas. Nice

Comments »

The URI to TrackBack this entry is: http://ontherocks.blogsome.com/2007/07/10/utilizar-codigo-server-side-no-sharepoint/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com