Fetch postback values of SharePoint fields

These pages contains the code I used when fetching postback values from different types of SharePoint fields.
This is useful when rendering fields dynamically on a form and saving values to list items from the postback data. In my case I was uploading documents to a SharePoint document library while maintaining the original metadata of the document such as created date, modified date, title and so on. I also wanted the user to be able to add new metadata to the uploaded document using existing fields in the library.

So here goes.
First a couple of helper functions to format data in the correct way for some fields.

And to fetch values for various field types:
Fetch a field of type URL.
Fetch a field of type Note.
Fetch a field of type Currency.
Fetch a field of type Number.
Fetch a field of type Text.
Fetch a field of type User.
Fetch a field of type UserMulti.
Fetch a field of type DateTime.
Fetch a field of type Taxonomy.
Fetch a field of type TaxonomyMulti.
Fetch a field of type Choice.
Fetch a field of type MultiChoice (Checkbox).
Fetch a field of type Lookup.
Fetch a field of type LookupMulti.
Fetch a field of type Boolean.

Leave a comment