tags:

views:

1511

answers:

3

i have a document library in sharepoint

what is the field called for the url of the uploaded documents? see commented line below to see what i am trying to do

SPDataSource dataSource = new SPDataSource();
dataSource.List = site.RootWeb.Lists["myList"];

 this.myDropDownList.DataSource = dataSource;
 this.myDropDownList.DataTextField = "Name";
 //this.myDropDownList.DataValueField = "URL";// what should this be??
 this.myDropDownList.DataBind();
A: 

I´m not quite sure about this (as I´m not that familiar with SPDataource) but my initial guess would be FileLeafRef.

Johan Leino
+1  A: 

I am afraid that you will not be able get the URL directly. FileLeafRef doent have the value full url. One Option I will suggest is to create a Calculated Column and generate the URL in that.

Kusek
A: 

An SPListItem has the FileRef and FileLeafRef Fields (depending on whether they are a "regular item" (FileRef) or a "document item" (FileLeafRef), they are not server relative url's though.

Colin