View Complete Post
Whenever I try using the object model on Sharepoint 2010, it gives an exception on SPSite itself. It says the site not found & gives a filenotfoundioexception. Please help me urgently. This is happening on all 64bit environments i work. It worked alright
with MOSS 2007 32-bit setup.
I want to make a windows form (VS 2010, C#.NET), where you can connect to a specific list on a SP site and display all the items in a Data Grid View.
I made the connection to x site and y list and display them to a treeview. When i add the list to the tree view, i set the property Tag to it and assign as value the name of the list. Then through the NodeMouseClick event handler i get the current list is
selected in the tree view.
The next step i want to display all the items from the list in a Data Grid View (windows form).
The event handler code is here:
private void farmExplorer_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
if (e.Node.Tag != null)
selectedList = ((SP.List)e.Node.Tag);
String newUrlToLoad = currentUrl.ToString() + selectedList.ParentWebUrl;
using (SP.ClientContext ctx = new SP.ClientContext(newUrlToLoad))
SP.Web webToLoad = ctx.Web;