Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Site Property Management (SharePoint 2010)

, 11 Jul 2010
Provides an administrative UI to manage custom properties for a SharePoint site
SPFSiteProperty.zip
QuestechSystems.SiteProperty
AppGlobalResources
SharePointProjectItem.spdata
bin
Release
QuestechSiteProperty.wsp
QuestechSystems.SharePoint.ApplicationPages.SiteProperty.dll
QuestechSystems.SharePoint.ApplicationPages.SiteProperty.pdb
ElementManifests
SharePointProjectItem.spdata
Features
QuestechSiteProperty
QuestechSiteProperty.feature
Layouts
Questech
SharePointProjectItem.spdata
Package
Package.package
pkg
pkgobj
Release
TokenReplaceFolder
Layouts
Questech
QuestechSiteProperty
ElementManifests
Release
QuestechSiteProperty
Layouts
Questech
QuestechSiteProperty
ElementManifests
Resources
QuestechSystems.SharePoint.ApplicationPages.SiteProperty.dll
Properties
QuestechSystems.SiteProperty.csproj.user
<%@ Assembly Name="QuestechSystems.SharePoint.ApplicationPages.SiteProperty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6c9c0cfe70b3391f" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddSiteProperty.aspx.cs" Inherits="QuestechSystems.SharePoint.ApplicationPages.Layouts.Questech.AddSiteProperty" DynamicMasterPageFile="~masterurl/default.master" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<script language="javascript" type="text/javascript">
    // <![CDATA[
    function _spFormOnSubmit() {
	    var L_alert1_text = "<SharePoint:EncodedLiteral runat='server' text='<%$Resources:QuestechSiteProperty,MsgSitePropertyNameEmpty%>' EncodeMethod='EcmaScriptStringLiteralEncode'/>";
	    document.getElementById(<%SPHttpUtility.AddQuote(SPHttpUtility.NoEncode(NameInputFormTextBox.ClientID),Response.Output);%>).value = TrimSpaces(document.getElementById(<%SPHttpUtility.AddQuote(SPHttpUtility.NoEncode(NameInputFormTextBox.ClientID),Response.Output);%>).value);
	    if (document.getElementById(<%SPHttpUtility.AddQuote(SPHttpUtility.NoEncode(NameInputFormTextBox.ClientID),Response.Output);%>).value.length < 1) {
		    window.alert(L_alert1_text);
		    document.getElementById(<%SPHttpUtility.AddQuote(SPHttpUtility.NoEncode(NameInputFormTextBox.ClientID),Response.Output);%>).focus();
		    return false;
	    }
    }
    function _spBodyOnLoad() {
	    try {
            document.getElementById(<%SPHttpUtility.AddQuote(SPHttpUtility.NoEncode(NameInputFormTextBox.ClientID),Response.Output);%>).focus();
        } catch(e) {}
    }
    // ]]>
</script>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:QuestechSiteProperty,AddSiteProperty_PageTitle%>" EncodeMethod='HtmlEncode'/>
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
    <a href="../settings.aspx"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,settings_pagetitle%>" EncodeMethod="HtmlEncode"/></a>&#32;<SharePoint:ClusteredDirectionalSeparatorArrow runat="server" /> <a href="./<%= QuestechSystems.SharePoint.ApplicationPages.Utility.PageNameManageSiteProperties %>"><asp:literal ID="Literal1" text='<%$Resources:QuestechSiteProperty,MngSiteProperties_PageTitle%>' runat="server"/></a>&#32;<SharePoint:ClusteredDirectionalSeparatorArrow runat="server" /> <asp:literal text='<%$Resources:QuestechSiteProperty,AddSiteProperty_PageTitle%>' runat="server"/>
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table class="propertysheet" border="0" width="100%" cellspacing="0" cellpadding="0">
    <wssuc:InputFormSection Title="<%$Resources:QuestechSiteProperty,SiteProperty_NameTitle%>" Description="<%$Resources:QuestechSiteProperty,SiteProperty_NameDescription%>" runat="server">
	    <Template_InputFormControls>
		    <wssuc:InputFormControl LabelText="<%$Resources:QuestechSiteProperty,SiteProperty_NameLabel%>" runat="server">
                <Template_Control>
                    <wssawc:InputFormTextBox ID="NameInputFormTextBox" Title="<%$Resources:QuestechSiteProperty,SiteProperty_NameInputTitle%>" class="ms-input" Columns="40" Runat="server" MaxLength="255" /><br/><asp:Label ID="NameErrorLabel" CssClass="ms-error" EnableViewState="false" runat="server" />
                </Template_Control>
		    </wssuc:InputFormControl>
	    </Template_InputFormControls>
    </wssuc:InputFormSection>
    <wssuc:InputFormSection Title="<%$Resources:QuestechSiteProperty,SiteProperty_ValueTitle%>" Description="<%$Resources:QuestechSiteProperty,SiteProperty_ValueDescription%>" runat="server">
	    <Template_InputFormControls>
		    <wssuc:InputFormControl LabelText="<%$Resources:QuestechSiteProperty,SiteProperty_ValueLabel%>" runat="server">
                <Template_Control>
                    <wssawc:InputFormTextBox ID="ValueInputFormTextBox" Title="<%$Resources:QuestechSiteProperty,SiteProperty_ValueInputTitle%>" class="ms-input" Columns="40" Runat="server" MaxLength="255" />
                </Template_Control>
		    </wssuc:InputFormControl>
	    </Template_InputFormControls>
    </wssuc:InputFormSection>
    <wssuc:ButtonSection BottomSpacing="0" runat="server">
        <Template_Buttons>
            <asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="OKButton_Click" Text="<%$Resources:wss,multipages_okbutton_text%>" ID="OKButton" accesskey="<%$Resources:wss,okbutton_accesskey%>"/>
        </Template_Buttons>
    </wssuc:ButtonSection>
    </table>
</asp:Content>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Stephen Huen
Software Developer (Senior)
Canada Canada
A Microsoft Certified Professional Developer and Technology Specialist.
 
Experience and expertise in SharePoint 2013 / 2010 / 2007.
 
Role ranges from a developer in a multi-person team to a solution consultant with expert-level skills, leading a project to completion status.
 
Proven experience working effectively in a team environment and a self-managed environment.
Follow on   LinkedIn

| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 12 Jul 2010
Article Copyright 2010 by Stephen Huen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid