Open your App Part from Solution explorer
Add Client Web part (Host web)..if you don't added to solution
Go to "Element.xml" under client web part
You will see Properties Inside Properties,
add one or two properties..
Save
If you want to access these propreties in the Host page load..use below code in page load
Add Client Web part (Host web)..if you don't added to solution
Go to "Element.xml" under client web part
You will see Properties Inside Properties,
add one or two properties..
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
<Property Name="EnumProperty1" Type="enum" WebBrowsable="true" WebDisplayName="Enum Property" WebDescription="Description for Enum Property" WebCategory="SharepointFrontier Properties" DefaultValue="Ind" RequiresDesignerPermission="true"> | |
<EnumItems> | |
<EnumItem Value="US" WebDisplayName="United States of America"/> | |
<EnumItem Value="Uk" WebDisplayName="United Kingdom"/> | |
<EnumItem Value="Ind" WebDisplayName="India"/> | |
</EnumItems> | |
</Property> | |
or | |
<Property Name="BooleanProperty1" Type="boolean" WebBrowsable="true" WebDisplayName="Boolean Property" WebDescription="Description for Boolean Property" WebCategory="SharepointFrontier Properties" DefaultValue="true" RequiresDesignerPermission="true"/> |
If you want to access these propreties in the Host page load..use below code in page load
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
var queryStringValue = getQuerystring('EnumProperty1'); | |
alert(queryStringValue); | |
var queryStringValue1 = getQuerystring('BooleanProperty1'); | |
alert(queryStringValue1); | |
function getQuerystring(key) { | |
key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); | |
var regex = new RegExp("[\\?&]" + key + "=([^&#]*)"); | |
var qs = regex.exec(window.location.href); | |
if (qs == null) | |
return null; | |
else | |
return qs[1]; | |
} |