Book Image

Microsoft SharePoint 2010 development cookbook

By : Ed Musters
Book Image

Microsoft SharePoint 2010 development cookbook

By: Ed Musters

Overview of this book

<p>There is a heavy demand in the marketplace for SharePoint developers that you could take advantage of - if only you had the opportunity to acquire the relevant skills! But, SharePoint 2010 is a big old product with a steep learning curve &ndash; where do you begin? <br /><br />This book has been designed to take the experienced ASP.NET developer from &ldquo;beginner&rdquo; to &ldquo;professional&rdquo; SharePoint developer in the shortest amount of time. You will be productive on you very first SharePoint development assignment with the knowledge and skills that you learn here. You will have distilled the essence of the author&rsquo;s many years of training, and leading development teams in SharePoint. <br /><br />This book uncovers the most common &ldquo;pattern&rdquo; of typical SharePoint development tasks encountered in the real world and puts the topics in a logical order with detailed step-by-step recipes for you to follow. <br />The practical example given builds and flows throughout the chapters and topics. By the end of this book, you will be able to apply the concepts to the challenges ahead of you!</p>
Table of Contents (15 chapters)
Microsoft SharePoint 2010 Development Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Creating Editor Parts for custom Web Part properties


As you have seen, you simply need to add attributes to a Web Part property and it will automatically appear in the Editor Zone. The Editor Zone will generate a basic control appropriate for the data type of the property—a drop-down control for an enumeration or a textbox for a string.

However, let us say you declared a property intended to enter an e-mail address. How can you verify that the value the person has entered is a valid e-mail address? Unfortunately you cannot, and now understand the limitations of the automatic control generation.

The solution to this is Custom Editor Parts! You can provide your very own user interface for the purpose of custom property editing. In this recipe, we will create a Custom Editor Part, complete with a custom user control for the purpose of making a better color selector.

Getting ready

We will be continuing from the previous recipe, Creating custom Web Part properties. Please open this solution in Visual...