I'm trying to find documents in Sharepoint uploaded by a specific user. So that user can fill in a username and get the related documents. i got the form working, now I need to search through all uploaded documents, filter it and present it.
This is what i all ready got:
using (SPSite site = new SPSite(SPContext.Current.Site.Url))
{
using (SPWeb web = site.OpenWeb())
{
SPFolder library = web.Folders["Shared Documents"];
grvUsers2.DataSource = library;
grvUsers2.DataBind();
}
}
I've uploaded a couple documents to Sharepoint, but in the code above i don't see them. What am I doing wrong?
By the way I'm building a webpart in C# for a teamsite in Sharepoint 2013.