1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Uploadding Document

Uploadding Document

6 posts, 0 answered
  1. SP
    SP avatar
    3 posts
    Registered:
    26 Jul 2011
    26 Jul 2011
    Link to this post
    Hi,
    I am trying to write code for Uploading a Document(.txt,.pdf)

    using Telerik.Sitefinity.Libraries.Model;
    using Telerik.Sitefinity.Modules.Libraries;

    i read in the sitefinity blog that i have to use these namespaces, but i am not able to get these,
    the only namespace i got is
    using Telerik.Sitefinity
    i am using the following things in my code,
    LibrariesManager libManager = LibrariesManager.GetManager(); //get parent document library DocumentLibrary docLib = libManager.GetDocumentLibraries().FirstOrDefault(); Document document = libManager.CreateDocument(); But how to get the above mentioned namespaces?
  2. Roberto
    Roberto avatar
    146 posts
    Registered:
    08 Feb 2008
    26 Jul 2011
    Link to this post
    Is this for a sitefinity project or custom module/widget?

    If its for a project the namespaces should be available, if its for a module/widget then you may need to add a reference to the Telerik.Sitefinity.dll from the empty_projects folder of your installation, weird that its not appearing though, this should be as standard.

    Rob
  3. SP
    SP avatar
    3 posts
    Registered:
    26 Jul 2011
    26 Jul 2011
    Link to this post
    This is for Custom Widget, i am using Telerik.Sitefinity Namespace but the other namespaces are not available also the dll also not available.
  4. Roberto
    Roberto avatar
    146 posts
    Registered:
    08 Feb 2008
    26 Jul 2011
    Link to this post
    Hi SP,

    You need to include the Telerik.Sitefinity.dll into the widget project you are working on.  If you have installed the SDK then you should have an _emptyProject folder in the telerik -> sitefinity folder under program files, in there, there should be a bin directory with all the dlls, and you nee to add the reference from within visual studio, you ned to browse to that directory and add it.

    Image attached showing where mine is.

    Rob
  5. SP
    SP avatar
    3 posts
    Registered:
    26 Jul 2011
    26 Jul 2011
    Link to this post
    i don't have that path on my C:\ OR D:\ either
  6. Roberto
    Roberto avatar
    146 posts
    Registered:
    08 Feb 2008
    26 Jul 2011
    Link to this post
    Log into you account, download and install the SDK.
6 posts, 0 answered