.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

Access a SharePoint list from a WinForm

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :SharePoint
 
I have created a winform. The winform runs on the server that is in the SharePoint Farm. It is throwing an exception when I try to connect to the list. Any ideas? Is there some special consideratoin I need to have when connecting with a winform? The winform just has a button that when pressed I want to give the created date a new value, which is part of the name of the file in the list.

Code:

 

using (SPSite site = new SPSite(http://inet533/sites/aamc/refctr/))
{


View Complete Post


More Related Resource Links

C# newbie stuck - trying to access column data in a SharePoint list in an SSIS script task

  
Hello, I'm sure this is the simplest question but I can't figure it out, even with Google's help. I am trying to stumble through some C# code in an SSIS script task and I am frustrated that I can't figure out how to do the easiest things.  I eventually want to find data in a column,and then use another list as a lookup to replace that value with another where the existing value matches a value in the lookup list.  So, the data in my (multiple choice) column might be "apples; bananas" and in another list I have a row that contains two columns, the first holding the value "Apples" and the second containing "Red Delicious" and my original column should read: "Red Delicious; bananas." But, alas, I can't even figure out how to see the data that is in a column. Here is my code: /*<br/> Microsoft SQL Server Integration Services Script Task<br/> Write scripts using Microsoft Visual C# 2008.<br/> The ScriptMain is the entry point class of the script.<br/> */<br/> <br/> using System;<br/> using System.Data;<br/> using Microsoft.SharePoint;<br/> using Microsoft.SqlServer.Dts.Runtime;<br/> using System.Windows.Forms;<br/> using Microsoft.SharePoint.Utilities;<br/> <br/> namespace ST_08becda4c05c49cd9f30ea76110076cd.csproj<br/> {<br/> [

How to link SharePoint List with MS Access 2007 programmatically

  
Hi, can anybody tell me how to link SharePoint List with MS Access 2007 without opening Access environment. I want to do it programmatically through C#/VB.net doesn't matter. Your help will very much appreciated. Thank you so much! -Jarexs

Cannot access parent site list from subsite in XSLt List View webpart in sharepoint designer 2010

  
Hi    We are using sharepoint 2010  for internet facing sites for our big client in healthcare domain .  I am using XSLT list view webpart in sharepoint designer 2010 for retrieving contents from sharepoint list & displaying it by using XSLT List view webpart in publishing sites. We are having lot of list in rootsite collection, If i am creating pages by using XSLt list view webpart in root site collection I can access the list,View and Display in Pages by XSLT List view webpart. Now the requirement is i have to access the list in roosite collection(parent site) from subsites.  In Sharepoint designer 2010, while i am inserting XSLT list view webpart, i could not find datasource to access the list that exist in rootsite collection(Parent site) from subsite. Below is the the code i am using for accessing the list& view from parent site & creating the pages in parent site by using xslt list view webpart,now i wants to access parent site list from subsite by using XSLT list view webpat in subsite pages.  Pls let me know what i have to change in the code level <WebPartPages:XsltListViewWebPart runat="server" Description="The list for the conditions details" ListDisplayName="" PartOrder="2" Default="FALSE" HelpLink="" AllowRemove="True" IsVisible="True" All

Cannot access parent site list from subsite in XSLt List View webpart in sharepoint designer 2010

  
Hi    We are using sharepoint 2010  for internet facing sites for our big client in healthcare domain .  I am using XSLT list view webpart in sharepoint designer 2010 for retrieving contents from sharepoint list & displaying it by using XSLT List view webpart in publishing sites. We are having lot of list in rootsite collection, If i am creating pages by using XSLt list view webpart in root site collection I can access the list,View and Display in Pages by XSLT List view webpart. Now the requirement is i have to access the list in roosite collection(parent site) from subsites.  In Sharepoint designer 2010, while i am inserting XSLT list view webpart, i could not find datasource to access the list that exist in rootsite collection(Parent site) from subsite. Below is the the code i am using for accessing the list& view from parent site & creating the pages in parent site by using xslt list view webpart,now i wants to access parent site list from subsite by using XSLT list view webpat in subsite pages.  Pls let me know what i have to change in the code level <WebPartPages:XsltListViewWebPart runat="server" Description="The list for the conditions details" ListDisplayName="" PartOrder="2" Default="FALSE" HelpLink="" AllowRemove="True" IsVisible="True" All

how to access items inside Sharepoint List Folder

  
hi all i have a list with structure as below  QuckList(List)                A(Folder)                       1(List Items)                       2(List Items)                B(Folder)                        1(List Items)   i have to display the List items inside the folder in drop down   i am able to access the folder as Splistitem, but not able to access the items inside the folder   any ideas how to access the items inside the List Folder   ragava_28

Access list from other site-sharepoint 2010

  
i am building a SharePoint site with many sub sites , in a publishing sub site i need to display a data view of a list that exists in other site how do i do it through Share-point designer 2010 or is there way using Visual Studio 2010 .Please provide me the best solution.  Thanks in advance.

Create List Sharepoint Client Object Model Access Denied

  

Hi,

I am trying to create a silverlight application by making use of the SharePoint 2010 Client Object Model using the following code:

private void CreateList(object sender, ClientRequestFailedEventArgs e)
{
  ClientContext ctx = new ClientContext("http://server");
  ListCreationInformation lc = new ListCreationInformation();
  lc.Title = "FlexiTime";
  lc.Description = "";
  lc.TemplateType = (int)ListTemplateType.GenericList;
  List newList = ctx.Web.Lists.Add(lc);
  System.Threading.ThreadPool.QueueUserWorkItem(new WaitCallback(CreateListCallback), ctx);
}

private void CreateListCallback(object s)
{
  var context = (ClientContext)s;  
  context.ExecuteQuery();
  this.Dispatcher.BeginInvoke(GetList);
}

The error I receive is as follows:

{System.Security.Se

Can I import a databse from MS Access into a SharePoint list if it contains attachments?

  

I have 2 issues I am trying to accomplish:

Background:  I have a SharePoint list of over 8000 entries.  This list contains Text (entries) and document attachments.  The list is approximately 400MB.  I have exported the entire SharePoint list into an Access database.  I now want to import parts of the database back into seperate SharePoint lists.

Endstate:  Break the list into seperate lists.  The seperate lists will be broken down by month.  The lists need to include all content from the original list (attachements included)

Issue 1:  Can I import only selected filtered fields into SharePoint from the Access database?

Issue 2:  Can I import the selected filtered fields to include the attachements?

 


Access Denied Error While trying edit sharepoint list item

  

 I have a sharepoint site (2007) with two subsites . while I am trying to edit  list items in subsite its giving me Access denied error even though I have the Site collection Admin Rights. 

     Please help . 


Cannot access parent site list from subsite using XSLt List View webpart in sharepoint designer 201

  

Hi
   We are using sharepoint 2010  for internet facing sites for our big client in healthcare domain .  I am using XSLT list view webpart in sharepoint designer 2010 for retrieving contents from sharepoint list & displaying it by using XSLT List view webpart in publishing sites.

We are having lot of list in rootsite collection, If i am creating pages by using XSLt list view webpart in root site collection I can access the list,View and Display in Pages by XSLT List view webpart.


Now the requirement is i have to access the list in roosite collection(parent site) from subsites.  In Sharepoint designer 2010, while i am inserting XSLT list view webpart, i could not find datasource to access the list that exist in rootsite collection(Parent site) from subsite.

Below is the the code i am using for accessing the list& view from parent site & creating the pages in parent site by using xslt list view webpart,now i wants to access parent site list from subsite by using XSLT list view webpat in subsite pages. 

Pls let me know what i have to change in the code level


<WebPartPages:XsltListViewWebPart runat="server" Description="The list for the conditions details" ListDisplayName="" PartOrder="2" Default="FALSE" HelpLink="" AllowR

access sharepoint list i like it tag programmatically.

  

hi,

is it possible to access the data of  a sharepoint 2010 lists i like it tag programmatically?

thanks

Aqib


Using SharePoint web services to access KPI List data

  

Hi,

How to get the indicators in a KPI list data(like list row data) from SharePoint using SharePoint web services

Regards,

Pramod

 


Pramod

SharePoint 2010 - Access Denied 403 error when viewing a list

  

Hey,

We have a solution packaged as a WSP. It has worked fine on three machines now, but the person that is going to be doing a demo cannot get this working right. The features activate fine for the site collection, however, when he goes to view any of the lists created by this feature (or any of the layouts application pages),  he gets 403 forbidden errors. He can view the built in lists OK. It seems like an IIS configuration issue, we have double checked all of his settings, anything we could be missing?

 

EDIT - He can open SharePoint Designer and view the lists fine from there, even navigate to the permissions for them.


Cannot access Sharepoint List using Lists.asmx webservice

  
var a = new ActiveXObject("Microsoft.XMLHTTP");
a.Open("POST",
"http://servername/site/_vti_bin/Lists.asmx",true);
a.setRequestHeader("Content-Type", "text/xml;charset=utf-8");
a.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/GetListItems");

var d = "<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:tns='http://schemas.microsoft.com/sharepoint/soap/'><soap:Body><tns:GetListItems><tns:listName>

Ready made List Types provided by SharePoint

  
SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Export SharePoint List to Excel Spreadsheet Programmatically using C#

  
In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

  
Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend