Last active
December 14, 2015 07:48
-
-
Save devendrasv/610ff3f7b4c23f3032a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page language="C#" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> | |
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> | |
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> | |
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> | |
<WebPartPages:AllowFraming ID="AllowFraming" runat="server" /> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript" src="../Scripts/App.js"></script> | |
<script type="text/javascript"> | |
// Set the style of the client web part page to be consistent with the host web. | |
function setStyleSheet() { | |
var hostUrl = "" | |
if (document.URL.indexOf("?") != -1) { | |
var params = document.URL.split("?")[1].split("&"); | |
for (var i = 0; i < params.length; i++) { | |
p = decodeURIComponent(params[i]); | |
if (/^SPHostUrl=/i.test(p)) { | |
hostUrl = p.split("=")[1]; | |
document.write("<link rel=\"stylesheet\" href=\"" + hostUrl + "/_layouts/15/defaultcss.ashx\" />"); | |
break; | |
} | |
} | |
} | |
if (hostUrl == "") { | |
document.write("<link rel=\"stylesheet\" href=\"/_layouts/15/1033/styles/themable/corev15.css\" />"); | |
} | |
} | |
setStyleSheet(); | |
</script> | |
</head> | |
<body> | |
<form id="form1" runat="server"> | |
<div> | |
<div id="AppPartmessage"></div> | |
<input type="button" value="App Part!" onclick="helloAppPart();" /> | |
</div> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment