C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » ASP.NET/Web Applications »

Adding field to a document library in sharepoint.


Posted Date: 02 Nov 2008    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: gowthami chowdaryMember Level: Gold    
Rating: 1 out of 5Points: 10



1. Open schema.xml file for the document library that is located in the following path:
LocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\DocumentLibrary\DocLib

2. Locate <Fields> tag and add following field inside the <Fields> tag:


<Field ID="{20487AC7-D872-4B10-ACB8-CF3002C29687}" Type="Text" Name="MyField" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="$Resources:core,MyField;" Filterable="TRUE" Sortable="TRUE" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="MyField"><!-- _locID@DisplayName="camlid2" _locComment=" " -->
</Field>

Field ID should be unique. Run Select NewID() in SQL Query Analyzer to get a new GUID and use it as the field ID.

3. Open core.en-US.resx file located in the following path:

LocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources

4. Locate following tag in the file:

<!-- shared resources -->

and add following lines in this section (shared resouces section)

<data name="MyField">
<value>My Demo Field</value>
</data>

5. Save the changes and reset IIS. Next time when you will create a document library, this field will be a part of your document libray.



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Sharepoint  .  Field  .  Document library  .  Add  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to use Connection object efficiently
Previous Resource: how to implement http compression in .net
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use