Using sharepoint webcontrols for desinging forms
Following is an useful msdn link for getting help related to controls
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.aspx
They are easy to brand with overall theme and master pages. following are list of few important controls
- Text Box -- SharePoint:InputFormTextBox
- Drop down -- SharePoint:DVDropDownList
- People Editor -- SharePoint:PeopleEditor
- Date Time -- SharePoint:DateTimeControl (for details on validation)
- Labels -- Sharepoint:EncodedLiteral
- /_controltemplates/InputFormSection.ascx for Defining section
- /_controltemplates/InputFormControl.ascx for defining control
----------------------------------------------------------------------
<%@ Assembly Name="Sample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=68802d514f1e9922"
%>
<%@ Control Language="C#" AutoEventWireup="true" Inherits="SampleNamespace.Sample"%>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" Src="/_controltemplates/InputFormSection.ascx"
%>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" Src="/_controltemplates/InputFormControl.ascx"
%>
<wssuc:InputFormSection Title="City" Description="Please select City." runat="server">
<template_inputformcontrols>
<wssuc:InputFormControl runat="server" LabelText="Country:" >
<Template_Control>
<SharePoint:DVDropDownList ID="cmbCoutnry" runat="server" AutoPostBack="true" />
</Template_Control>
</wssuc:InputFormControl>
<wssuc:InputFormControl runat="server" LabelText="City:">
<Template_Control>
<SharePoint:DVDropDownList ID="cmbCity" runat="server" />
</Template_Control>
</wssuc:InputFormControl>
</template_inputformcontrols>
</wssuc:InputFormSection>
<wssuc:InputFormSection Title="Dates" Description="Please select Dates." runat="server">
<template_inputformcontrols>
<wssuc:InputFormControl runat="server" LabelText="Start Date:">
<Template_Control>
<SharePoint:DateTimeControl ID="dtStartDate" runat="server" />
</Template_Control>
</wssuc:InputFormControl>
<wssuc:InputFormControl runat="server" LabelText="End Date:">
<Template_Control>
<SharePoint:DateTimeControl ID="dtEndDate" runat="server" />
</Template_Control>
</wssuc:InputFormControl>
</template_inputformcontrols>
</wssuc:InputFormSection>
Comments
Post a Comment