在SharePoint开发过程中会遇到给比如Custom Page Layout添加自带的Web Control,但往往不知用哪个控件。用错的话会给出:An unexpected error has occurred。
下表为Column Data Type之对应关系。
SharePoint data type | SharePoint Web Control |
Single line of text | TextField |
Multiple lines of text |
|
PlainText | NoteField |
Rich Text | RichTextField |
Enhanced Rich Text | RichTextField |
Choice |
|
Dropdown | DropDownChoiceField |
Radio Button | RadioButtonChoiceField |
Number | NumberField |
Currency | CurrencyField |
Date and Time | DateTimeField |
Lookup |
|
Single Item | LookupField |
Multiple Items | MultipleLookupField |
Yes/No | BooleanField |
Person or Group | UserField |
Hyperlink or Picture | UrlField |
Calculated | UrlField |
Business data |
|
摘自
http://www.hezser.de/blog/archive/2007/04/29/how-to-use-the-sharepoint-web-controls.aspx