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.

2
  • 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 9, 2013 at 7: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 1, 2013 at 8:51

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.