Tuesday, 13 March 2012

How to access Sitecore Content Database in Code Behind (Sitecore v6.5) - 3

Content Database:
Sitecore Content Editor primarily interact with Content database i.e. Master Database(by default).
To get the content database, use the following property.
Sitecore.Data.Database contentDB = Sitecore.Context.ContentDatabase;
Note: Add Sitecore.Kernel.dll reference to project.

No comments:

Post a Comment

Articles

Automatically create new version for Lock & Edit without workflow

Sitecore will create a new version on Lock and Edit if the item is tied to a workflow. For our case, version has to be created even withou...