0
        foreach (SPListItem item in listitems)

        {
            AttachmentControlTemplate atch_templt = new AttachmentControlTemplate(countr);
            atch_templt.lnk_btn.Text = item.File.Name;
            atch_templt.lnk_btn.OnClientClick = "window.open('" + site_url + "/" + item.File.Url + "')";

        }      

Above sever side code shows the way of retrieving the name of a document which saved in a SharePoint document library by using "item.File.Name",i have done this completely, but how do i do same thing by using Client Object Model. What should i use instead of "item.File.Name".

Would anyone help me to sort this out ??

Any help is greatly appreciated.

Nera
  • 117
  • 1
  • 1
  • 8
  • Just now i found that i can retrieve the particular file name by using " currentmodule.get_item("LinkFilename")", but how can i retrieve the url of that particular file ? – Nera Jul 09 '13 at 07:15
  • finally i have found the way to get the Url of a saved document. i am sharing it with others. i have retrieved the file name and concatenated with the Url of the document library. – Nera Aug 01 '13 at 08:51

1 Answers1

0

finally i have found the way to get the Url of a saved document. i am sharing it with others. i have retrieved the file name and concatenated with the Url of the document library.

var fileUrl = "Document library Url" + "File Name";

By using above fileUrl, the document can be opened.

Nera
  • 117
  • 1
  • 1
  • 8