Friday, June 13, 2008

Using Sharepoint Web Controls (PeopleEditor and InputFormTextBox) in Microsoft Office Sharepoint Designer 2007

Recently, in my last project, I used SPD a lot. I want to share how to use sharepoint web controls ,especially PeopleEditor (used to select user/multiple users) and InputFormTextbox (used for Enhanced Rich Text).

To use Sharepoint  InputFormTextBox , just use this code in your SPD.

<SharePoint:InputFormTextBox ID="txtBxDetails" RichText="true"  RichTextMode="Compatible" runat="server" TextMode="MultiLine" Rows="10" Columns="10" ></SharePoint:InputFormTextBox>

The result will be like this

Sharepoint InputFormTextBox

To use Sharepoint  PeopleEditor , just use this code in your SPD.

<SharePoint:PeopleEditor id="peopleEditor" runat="server" IsValid="true" AllowEmpty="false" Height="20px" Width="200px" BackColor="Cornsilk" AllowTypeIn="true" MultiSelect="false" />

To enable multiple selection , just set MultiSelect property to true, false otherwise.
The result will be like this


Sharepoint PeopleEditor

Here are the sources if you want to see the details : InputFormTextBox and PeopleEditor

No comments: