0

Our SharePoint site has multiple Content Editor web parts that use Content Link to call ASP scripts on a different web server.

Example: my-sharepoint.com/home.aspx has Content Editor web part #1. The web part uses Content Link to request my-webserver.com/get.asp?what=links.

GET.ASP is able to record the querystring parameters sent to it (i.e. what=links), but it cannot identify what page made the query (my-sharepoint.com/home.aspx). Is there anyway to do this? I do not see any special HTTP headers or HTTP referers to help me.

0
  • OPTION 1:

Why not pass another URL parameter called FROMPAGE & catch the value in your ASP for recording?

my-webserver.com/get.asp?what=links&FROMPAGE=my-sharepoint.com/home.aspx

  • OPTION 2:

Put it in an IFRAME (src will be your .asp page). Now you will certainly get information in headers or other ways. In your .ASP page, you can use below

 var isInIFrame = (window.location != window.parent.location) ? true : false;

OR

if (window.self === window.top) {
  // we're NOT in an iframe
} else {
  // we're in an iframe
}
  • Anand, thanks for your suggestion! We may have to go with the FROMPAGE solution. We have many web parts making these types of remote calls and we are researching the fastest, best approach to finding them all. Having a referer trail would have been amazing, but it does not seem to be legitimately possible for us. – Robert Simpson Mar 25 '14 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.