Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to include aspx files in sharepoint designer?

  Asked By: Fredrick    Date: Feb 02    Category: Sharepoint    Views: 3298

I know how to include javascripts and style sheets in master
pages. Can I include aspx pages? When I try the normal include string
(<!--#include file="home/linklist.aspx"-->) sharepoint designer tells me that
the page is not allowed. I am working in wss3. Can I do this?



4 Answers Found

Answer #1    Answered By: Robby Barr     Answered On: Feb 02

Can you give a little background on what you are trying to accomplish?

Answer #2    Answered By: Patrick Davis     Answered On: Feb 02

Okay. My main idea is to be able to add some asp.net functions into my
sharepoint pages. If I can do it with js or css, why not with asp.net? Asp.net
runs server-side, so I need not worry about whether js is turned on or off.
Plus, since it is server-side, I don't have to worry about browser discrepencies
in the interpretation of code. I want to create a sort of asp.net library
(preferably VB.net) and use the functions in Sharepoint.

Right now I am doing it with javascript in this fashion: In the header of the
master page I include the js file. Then, just before the body close-tag in the
master page, I put a function call, the function of which is set when the js
file is loaded (it looks to see what the location is and then decides what
function to run). I figure I can do the same thing using server-side code, that
is, if I can figure out how to include an asp.net library into my sharepoint

Answer #3    Answered By: Alexander Rocha     Answered On: Feb 02

You can't add server side code directly to a SharePoint page using SPD.
It's a security violation. There is an entry in the Web.config file of the
web application called the pageparserpath that controls where code can be
compiled from. Pages stored in the content database are NOT included in the
path. This is to prevent hackers from placing server side script on a page.
Even if you had access to the setting its not a good idea to change it.

The only recommended way to reference server side code from a page in SPD is
to reference a managed code assembly written in Visual Studio and deployed
to the server. Since you are running in a hosted environment you don't have
access to that.

This changes somewhat in 2010 with the introduction of Sandbox solutions.
Sandbox solutions allow for the development and deployment of managed code
assemblies in the content database. You still can't reference them
externally, but it does allow the creation of self contained web parts, etc.
by users in a hosted environment who don't have access to the server file

Answer #4    Answered By: Maggie Benson     Answered On: Feb 02

I figured as much, but wanted to find out for sure. I
appreciate your help, I do!

Didn't find what you were looking for? Find more on How to include aspx files in sharepoint designer? Or get search suggestion and latest updates.