private void CreateSubSites(string parentSiteURL, string siteURLRequested, string siteTitle, string siteTemplateName)
{
const Int32 LOCALE_ID_ENGLISH = 1033;
string newSiteURL = string.Empty;
SPSecurity.RunWithElevatedPrivileges(delegate()
...
Friday, 29 November 2013
Programmatically Create Subsite in SharePoint using c#
Continue Reading...
Labels:
C#,
SharePoint,
subsite
programmatically reterive item from sharepointlist using caml query in sharepoint
SPSite mySite = new SPSite(SPContext.Current.Site.ID);
SPWeb myWeb = mySite.OpenWeb();
SPList myList = myWeb.Lists["ListName"];
SPQuery query = new SPQuery();
string CurrentDate = DateTime.Now.ToString("yyyy-MM-dd");
...
Labels:
C#,
caml Query,
programmatically,
SharePoint
get last list item id in sharepoint list using c#
SPSite oSPsite = new SPSite(SPContext.Current.Site.ID);
SPWeb oSPWeb = oSPsite.OpenWeb();
SPList list = oSPWeb.Lists["ListName"];
SPQuery query = new SPQuery();
query.RowLimit = 1;
...
Labels:
C#,
programmatically,
SharePoint
Programmaticaly Add user in sharepoint list using c#
SPSite oSPsite = new SPSite(SPContext.Current.Site.ID);
SPWeb oSPWeb = oSPsite.OpenWeb();
SPList list = oSPWeb.Lists["user"];
SPListItem oSPListItem = list.Items.Add();
SPFieldUserValueCollection userCollection = new SPFieldUserValueCollection();
...
Labels:
C#,
programmatically,
SharePointList,
user
Programmaticaly Add multi user in sharepoint list using c#
DataTable table = new DataTable();
table.Columns.Add("Title", typeof(string));
table.Columns.Add("UserName", typeof(string));
table.Rows.Add( "Mohamedsithik","User1");
table.Rows.Add("Raja", "User2");
table.Rows.Add("Uthaya",...
Labels:
C#,
Multi User,
programmatically,
SharePoint,
SharePointList
Wednesday, 27 November 2013
Programmatically get people picker value from sharepoint list using C#
string users = string.Empty;
SPFieldUserValueCollection userCol = new SPFieldUserValueCollection(SPContext.Current.Web, listItem["SiteOwner"].ToString());
foreach (SPFieldUserValue usrItm in userCol)
{
users += usrItm.User.ToString() + ",";
}
this.spPeoplePicker.CommaSeparatedAccounts = users.Remove(users.LastIndexOf(","),...
Labels:
C#,
PeoplePicker,
SharePoint,
SharePointList
programmatically upload document library file in SharePoint 2013 with meta data using c#
string fileNameonly = Fileupload1.FileName; // Only file name.
private byte[] ToByteArray(Stream inputStream)
{
using (MemoryStream ms = new MemoryStream())
{
inputStream.CopyTo(ms);
return...
Labels:
C#,
Document Libray,
Meta Data,
programmatically,
SharePoint,
SharePoint 2013,
upload
Thursday, 21 November 2013
sharepoint custom attachement upload control with example
sharepoint custom attachement upload control with example
Design Code:-
<table> <tr><td>
<asp:HiddenField Value="hDeleteAttachs" ID="hHiddenFields" runat="server" />
</td></tr>
<tr>
<td><span id="part1">
<SharePoint:AttachmentButton...
Labels:
attachement,
C#,
custom,
SharePoint,
upload
Select Insert update delete SharePoint custom list data using CSOM C# Example
public class EmpInfo
{
public EmpInfo(string Name, string Age)
{
_Name = Name;
...
Labels:
C#,
client object model,
csom,
SharePoint
the remote server returned an error 401 unauthorized sharepoint client object model

Solution:-
NetworkCredential credentials = new NetworkCredential("username", "pwd", "domain");
ClientContext context = new ClientContext("http://site-url");
context.Credentials = credentials;
...
Labels:
401,
Error,
SharePoint
Tuesday, 19 November 2013
visual studio 2012 sharepoint 2013 templates missing
Solution:-
Check the below url
http://www.sharepoint24x7.com/2013/03/18/articlehow-to-enable-sharepoint-2013-development-project-templates-in-visual-studio-2012/
...
Labels:
SharePoint 2013,
Templates,
visual Studio 2012
Excel data to DataTable using c#
DataTable dt = new DataTable();
string line = null;
int i = 0;
using (StreamReader sr = File.OpenText(@"E:\Sample.csv"))
{
...
SharePoint 2013 Content Deployment Source feature

SharePoint 2013 Content Deployment Source feature
Site settings
Site Collection Features
Content Deployment Source Feature -----> Activate features
site settings
Site Collection Administration section
click Content Deployment Source Status
...
Labels:
SharePoint,
SharePoint 2013
An object of the type Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPool named

Sorry, something went wrong
An unhandled exception occurred in the user interface.Exception Information: An object of the type Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPool...
Labels:
Error,
SharePoint
programmatically Insert,update,delete in sharepoint list using c#
Add New Item :-
public void AddNewItem()
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
...
Labels:
C#,
programmatically,
SharePoint
we are having a problem opening this location in file explorer sharepoint 2013

Solution:-
Just add the Desktop Experience
Refer the below link
http://www.win2012workstation.com/desktop-experience/
...
Labels:
Error,
SharePoint
open with explorer sharepoint disabled

Solution:-
Just open the same Document in Internet Explorer(IE)
...
Labels:
SharePoint,
sharePoint 2010,
SharePoint 2013
sign in different user missing in sharepoint 2013

1.Just open the following fileC:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES\Welcome.ascx2.Add the below line inside the file<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser" Text="<%$Resources:wss,personalactions_loginasdifferentuser%>" Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>" MenuGroupId="100" ...
Rename ContentDataBaseName in SharePoint Using SQLQuery
Alter ContentDb Name
USE MASTER;GOALTER DATABASE [WSS_Content_fdc3317e5897456ab294ef998ec46420]SET SINGLE_USER WITH ROLLBACK IMMEDIATEGOALTER DATABASE [WSS_Content_fdc3317e5897456ab294ef998ec46420]MODIFY NAME= WSS_Content4;GOALTER DATABASE WSS_Content4SET MULTI_USERG...
Delete SharePoint Content DataBase using PowerShell
Syntax:-Remove-SPWebApplication http://sitename -Confirm -DeleteIISSite -RemoveContentDatabasesExample:-Remove-SPWebApplication http://abcd01:1111/ -Confirm -DeleteIISSite -RemoveContentDatabas...
move site collection from one web application to another web application using powershell
Example Script:-#Get the from Site Collection URL$fromURL = "http://Abcd:5000/sites/Fromsite"#Get the to Site Collection URL $toURL = "http://sfs01:4000/sites/Rsite3/"#Location to the backup file directory to store Site Collection backup files$backupPath = "C:\\SiteBK.bak"#Backing up Site Collection prior to movingWrite-Host "Backing Up Site Collection…."Backup-SPSite $fromURL -Path C:\SiteBK.bak -force#Removing Site Collection...
Subscribe to:
Posts (Atom)
Followers
Follow The Author
Designed By Templateism | Seo Blogger Templates