<input type="button" value="Submit" onclick="createListItem();" style="width: 89px" />
<input type="button" value="Update" onclick="updateListItem();" style="width: 89px" />
<input type="button" value="Delete" onclick="deleteListItem();" style="width: 89px" />
<script type="text/javascript">
var siteUrl = '/sites/TeamSite1';
function createListItem() {
...
Wednesday, 4 December 2013
Insert,update,delete in sharepoint list using Javascript
Continue Reading...
Labels:
Javascript,
SharePoint
Delete all SharePoint List Item using Powershell in SharePoint
Sytax:-
$SITEURL = "http://serverurl"
$site = new-object Microsoft.SharePoint.SPSite ( $SITEURL )
$web = $site.OpenWeb()
"Web is : " + $web.Title
$oList = $web.Lists["LIST NAME"];
"List is :" + $oList.Title + " with item count " + $oList.ItemCount
$collListItems = $oList.Items;
$count = $collListItems.Count - 1
for($intIndex = $count; $intIndex -gt -1; $intIndex--)
{
"Deleting record: " + $intIndex
...
Labels:
Powershell,
SharePoint,
sharePoint 2010,
SharePoint 2013
Tuesday, 3 December 2013
join two sharepoint list using c#

1.Create a custom list name as "List1" with below column
2.Create a custom list name as "List2" with below column
3.paste the below code inside the webpart
public void GetEmployee()
{
SPWeb objweb = SPContext.Current.Web;
...
Labels:
C#,
CustomList,
Linq,
sharePoint 2010,
SharePoint 2013
Timer Job Example in SharePoint 2013

1.open visual studio 2012
2.Add SharePoint2013-Empty Project named it "TimerJobExample"
3.Enter your site collection and choose Deploy as a Farm solution
4.Add class file in your solution named it "Employee"
5.paste the below code inside the Employee class
public class Employee : SPJobDefinition
{
...
Labels:
C#,
sharePoint 2010,
SharePoint 2013,
Timer Jobs
Create sharepoint list custom form via visual studio 2012

1.open visual studio 2012
2.Add Sharepoint 2013 Empty project Named it "Employee"
3.Create a custom list name as "Employee" and add the below columns
4.Right click the project add the layouts folder inside that add one Application page named it "EmpCustomForm"
5.Paste the below code inside the Content ID "Main"
...
Labels:
C#,
Custom Form,
CustomList,
SharePoint 2013,
visual Studio 2012
Friday, 29 November 2013
Programmatically Create Subsite in SharePoint using c#
private void CreateSubSites(string parentSiteURL, string siteURLRequested, string siteTitle, string siteTemplateName)
{
const Int32 LOCALE_ID_ENGLISH = 1033;
string newSiteURL = string.Empty;
SPSecurity.RunWithElevatedPrivileges(delegate()
...
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
Subscribe to:
Posts (Atom)
Followers
Follow The Author
Designed By Templateism | Seo Blogger Templates